ProxyDataContractResolver.TryResolveType Method

Definition

During serialization, maps actual types to xsi:type information.

C#
public override bool TryResolveType(Type dataContractType, Type declaredType, System.Runtime.Serialization.DataContractResolver knownTypeResolver, out System.Xml.XmlDictionaryString typeName, out System.Xml.XmlDictionaryString typeNamespace);

Parameters

dataContractType
Type

The actual type of the persistence-ignorant object.

declaredType
Type

The declared type.

knownTypeResolver
DataContractResolver

An instance of ProxyDataContractResolver.

typeName
XmlDictionaryString

When this method returns, contains a list of xsi:type declarations.

typeNamespace
XmlDictionaryString

When this method returns, contains a list of namespaces used.

Returns

true if the type was resolved; otherwise, false.

Remarks

For more information, see: Working with POCO Entities.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1