語言

DataServiceContext.ResolveName 屬性

定義

取得或設定一個函式,覆蓋用戶端函式庫在將實體傳送到資料服務時所使用的預設類型解析策略。

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

屬性值

回傳包含 的字 DataServiceContext串名稱。

備註

啟用覆蓋用戶端函式庫所使用的預設型別解析。 將此屬性設為一個代理,該代理用來將用戶端應用程式中的型別解析為命名空間限定型別名稱的函式。 這使用戶端能夠在伺服器回應中提供的型別名稱與用戶端的型別之間進行自訂對應。

Note

此方法允許覆寫已序列化至目標表示(如 Atom 或 JSON)的實體名稱,適用於指定型別。

適用於