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。

适用于