ResolveName Method
Collapse the table of content
Expand the table of content

DataContractResolver.ResolveName Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Override this method to map the specified xsi:type name and namespace to a data contract type during deserialization.

Namespace:  System.Runtime.Serialization
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public abstract Type ResolveName(
	string typeName,
	string typeNamespace,
	Type declaredType,
	DataContractResolver knownTypeResolver
)

Parameters

typeName
Type: System.String
The xsi:type name to map.
typeNamespace
Type: System.String
The xsi:type namespace to map.
declaredType
Type: System.Type
The type declared in the data contract.
knownTypeResolver
Type: System.Runtime.Serialization.DataContractResolver
The known type resolver.

Return Value

Type: System.Type
The type the xsi:type name and namespace is mapped to.

If you want to use the known type resolution logic inside your implementation, a reference to it is passed in as the knownTypeResolver parameter.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft