ProxyDataContractResolver.ResolveName 方法

定义

反序列化过程中,将任意 xsi:type 信息映射到持久性未知对象的实际类型。

public:
 override Type ^ ResolveName(System::String ^ typeName, System::String ^ typeNamespace, Type ^ declaredType, System::Runtime::Serialization::DataContractResolver ^ knownTypeResolver);
public override Type ResolveName (string typeName, string typeNamespace, Type declaredType, System.Runtime.Serialization.DataContractResolver knownTypeResolver);
override this.ResolveName : string * string * Type * System.Runtime.Serialization.DataContractResolver -> Type
Public Overrides Function ResolveName (typeName As String, typeNamespace As String, declaredType As Type, knownTypeResolver As DataContractResolver) As Type

参数

typeName
String

要映射的 xsi:type 信息。

typeNamespace
String

xsi:type 的命名空间。

declaredType
Type

声明的类型。

knownTypeResolver
DataContractResolver

ProxyDataContractResolver 的一个实例。

返回

xsi:type 映射到的类型,如果找不到与 xsi:type 匹配的已知类型,则为 null

注解

有关详细信息,请参阅: 使用 POCO 实体

适用于