ProxyDataContractResolver.ResolveName 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
在還原序列化期間,將任何 xsi:type 資訊對應至非持續性物件的實際類型。
命名空間: System.Data.Entity.Core.Objects
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Overrides Function ResolveName ( _
typeName As String, _
typeNamespace As String, _
declaredType As Type, _
knownTypeResolver As DataContractResolver _
) As Type
'用途
Dim instance As ProxyDataContractResolver
Dim typeName As String
Dim typeNamespace As String
Dim declaredType As Type
Dim knownTypeResolver As DataContractResolver
Dim returnValue As Type
returnValue = instance.ResolveName(typeName, _
typeNamespace, declaredType, knownTypeResolver)
public override Type ResolveName(
string typeName,
string typeNamespace,
Type declaredType,
DataContractResolver knownTypeResolver
)
public:
virtual Type^ ResolveName(
String^ typeName,
String^ typeNamespace,
Type^ declaredType,
DataContractResolver^ knownTypeResolver
) override
abstract ResolveName :
typeName:string *
typeNamespace:string *
declaredType:Type *
knownTypeResolver:DataContractResolver -> Type
override ResolveName :
typeName:string *
typeNamespace:string *
declaredType:Type *
knownTypeResolver:DataContractResolver -> Type
public override function ResolveName(
typeName : String,
typeNamespace : String,
declaredType : Type,
knownTypeResolver : DataContractResolver
) : Type
參數
- typeName
類型:System.String
要對應的 xsi:type 資訊。
- typeNamespace
類型:System.String
xsi:type 的命名空間。
- declaredType
類型:System.Type
宣告的類型。
- knownTypeResolver
類型:System.Runtime.Serialization.DataContractResolver
ProxyDataContractResolver 的執行個體。
傳回值
類型:System.Type
傳回 xsi:type 對應的類型。如果找不到符合 xsi:type 的已知類型,則傳回 null。