KnownTypesResolver.TryResolveType Method (Type, Type, DataContractResolver, XmlDictionaryString, XmlDictionaryString)
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online
Maps any type to a new xsi:type representation.
Namespace: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)
Syntax
public override bool TryResolveType(
Type type,
Type declaredType,
DataContractResolver knownTypeResolver,
out XmlDictionaryString typeName,
out XmlDictionaryString typeNamespace
)
Public Overrides Function TryResolveType (
type As Type,
declaredType As Type,
knownTypeResolver As DataContractResolver,
<OutAttribute> ByRef typeName As XmlDictionaryString,
<OutAttribute> ByRef typeNamespace As XmlDictionaryString
) As Boolean
Parameters
type
Type: System.TypeType. The type to map.
declaredType
Type: System.TypeType. The type declared in the data contract.
knownTypeResolver
Type: System.Runtime.Serialization.DataContractResolverSystem.Runtime.Serialization.DataContractResolver. The known type resolver.
typeName
Type: System.Xml.XmlDictionaryStringSystem.Xml.XmlDictionaryString. The xsi:type name.
typeNamespace
Type: System.Xml.XmlDictionaryStringSystem.Xml.XmlDictionaryString. The xsi:type namespace.
Return Value
Type: System.Boolean
Type: Boolean
true if mapping succeeded; otherwise, false.
Remarks
For information on this method, refer to the DataContractResolver class.
See Also
KnownTypesResolver Class
Microsoft.Xrm.Sdk Namespace
Return to top
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright