DataServiceContext.ResolveType 屬性

定義

取得或設定一個函式,用以覆寫用戶端函式庫在接收資料服務實體時所使用的預設型別解析選項。

public:
 property Func<System::String ^, Type ^> ^ ResolveType { Func<System::String ^, Type ^> ^ get(); void set(Func<System::String ^, Type ^> ^ value); };
public Func<string,Type> ResolveType { get; set; }
member this.ResolveType : Func<string, Type> with get, set
Public Property ResolveType As Func(Of String, Type)

屬性值

一個函式代理,用來識別一個覆寫函式,用來覆寫用戶端函式庫所使用的預設型別解析選項。

備註

可覆蓋用戶端函式庫所使用的預設型別解析策略。 將此屬性設為一個代理,識別一個函式,將一個由命名空間限定的型別名稱解析為客戶端應用程式中的型別。 這讓用戶端能夠自訂對應伺服器回應中提供的型別名稱與用戶端的型別。

覆寫型別解析也允許在型別名稱與型別之間插入自訂的映射策略。 它不影響回應如何具體化到已識別的類型。

適用於