共用方式為


ImportOptions.DataContractSurrogate 屬性

定義

取得或設定數據合約代理提供者,可用來修改匯入作業期間產生的程序代碼。

public:
 property System::Runtime::Serialization::ISerializationSurrogateProvider ^ DataContractSurrogate { System::Runtime::Serialization::ISerializationSurrogateProvider ^ get(); void set(System::Runtime::Serialization::ISerializationSurrogateProvider ^ value); };
public:
 property System::Runtime::Serialization::IDataContractSurrogate ^ DataContractSurrogate { System::Runtime::Serialization::IDataContractSurrogate ^ get(); void set(System::Runtime::Serialization::IDataContractSurrogate ^ value); };
public System.Runtime.Serialization.ISerializationSurrogateProvider? DataContractSurrogate { get; set; }
public System.Runtime.Serialization.IDataContractSurrogate DataContractSurrogate { get; set; }
member this.DataContractSurrogate : System.Runtime.Serialization.ISerializationSurrogateProvider with get, set
member this.DataContractSurrogate : System.Runtime.Serialization.IDataContractSurrogate with get, set
Public Property DataContractSurrogate As ISerializationSurrogateProvider
Public Property DataContractSurrogate As IDataContractSurrogate

屬性值

處理架構匯入之 IDataContractSurrogate 介面的實作。

備註

此選項的介面類型是 ISerializationSurrogateProvider,但若要充分利用匯入的程式代碼修改功能,建議使用也實作 ISerializationCodeDomSurrogateProviderISerializationSurrogateProvider2ISerializationSurrogateProvider2。

適用於