WrapperProviderContext Class

Summary

The context used by an [Microsoft.AspNet.Mvc.Xml.IWrapperProvider](Microsoft.AspNet.Mvc.Xml.IWrapperProvider.yml) to wrap or un-wrap types.

Syntax

public class WrapperProviderContext

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Xml.WrapperProviderContext

Constructors

WrapperProviderContext(System.Type, System.Boolean)

Initializes a [Microsoft.AspNet.Mvc.Xml.WrapperProviderContext](Microsoft.AspNet.Mvc.Xml.WrapperProviderContext.yml).

Arguments:
  • declaredType (System.Type) – The declared type of the object that needs to be wrapped.
  • isSerialization (System.Boolean) – <see langword=”true” /> if the wrapper provider is invoked during serialization, otherwise <see langword=”false” />.
public WrapperProviderContext(Type declaredType, bool isSerialization)

Properties

DeclaredType()

The declared type which could be wrapped/un-wrapped by a different type during serialization or de-serializatoin.

Return type:System.Type
public Type DeclaredType { get; }
IsSerialization()

<see langword=”true” /> if a wrapper provider is invoked during serialization,

<see langword=”false” /> otherwise.

Return type:System.Boolean
public bool IsSerialization { get; }