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實體合作。