ImportOptions.DataContractSurrogate 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个数据协定代理项提供程序,该代理项提供程序可用于修改在导入操作期间生成的代码。
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,但若要充分利用导入的代码修改功能,建议使用同时实现 ISerializationCodeDomSurrogateProvider 的 ISerializationSurrogateProvider2ISerializationSurrogateProvider2。