DataContractSerializerExtensions.SetSerializationSurrogateProvider 方法

定义

指定用于此 DataContractSerializer 的代理项序列化提供程序。

public:
[System::Runtime::CompilerServices::Extension]
 static void SetSerializationSurrogateProvider(System::Runtime::Serialization::DataContractSerializer ^ serializer, System::Runtime::Serialization::ISerializationSurrogateProvider ^ provider);
public static void SetSerializationSurrogateProvider (this System.Runtime.Serialization.DataContractSerializer serializer, System.Runtime.Serialization.ISerializationSurrogateProvider provider);
public static void SetSerializationSurrogateProvider (this System.Runtime.Serialization.DataContractSerializer serializer, System.Runtime.Serialization.ISerializationSurrogateProvider? provider);
static member SetSerializationSurrogateProvider : System.Runtime.Serialization.DataContractSerializer * System.Runtime.Serialization.ISerializationSurrogateProvider -> unit
<Extension()>
Public Sub SetSerializationSurrogateProvider (serializer As DataContractSerializer, provider As ISerializationSurrogateProvider)

参数

serializer
DataContractSerializer

正在作为代理项的序列化程序。

provider
ISerializationSurrogateProvider

代理项序列化提供程序。

适用于