ProxyDataContractResolver.TryResolveType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在序列化期间,将实际类型映射到 xsi:type 信息。
public:
override bool TryResolveType(Type ^ dataContractType, Type ^ declaredType, System::Runtime::Serialization::DataContractResolver ^ knownTypeResolver, [Runtime::InteropServices::Out] System::Xml::XmlDictionaryString ^ % typeName, [Runtime::InteropServices::Out] System::Xml::XmlDictionaryString ^ % typeNamespace);
public override bool TryResolveType(Type dataContractType, Type declaredType, System.Runtime.Serialization.DataContractResolver knownTypeResolver, out System.Xml.XmlDictionaryString typeName, out System.Xml.XmlDictionaryString typeNamespace);
override this.TryResolveType : Type * Type * System.Runtime.Serialization.DataContractResolver * XmlDictionaryString * XmlDictionaryString -> bool
Public Overrides Function TryResolveType (dataContractType As Type, declaredType As Type, knownTypeResolver As DataContractResolver, ByRef typeName As XmlDictionaryString, ByRef typeNamespace As XmlDictionaryString) As Boolean
参数
- dataContractType
- Type
持久性无知对象的实际类型。
- declaredType
- Type
声明的类型。
- knownTypeResolver
- DataContractResolver
- typeName
- XmlDictionaryString
此方法返回时,包含声明列表 xsi:type 。
- typeNamespace
- XmlDictionaryString
此方法返回时,包含使用的命名空间列表。
返回
true 如果类型已解析,则为否则,为 false.
注解
有关详细信息,请参阅: 使用 POCO 实体。