ISerializationSurrogateProvider ISerializationSurrogateProvider ISerializationSurrogateProvider ISerializationSurrogateProvider Interface

定義

提供建構擴充 DataContractSerializer 的序列化代理所需之方法。Provides the methods needed to construct a serialization surrogate that extends the DataContractSerializer. 在序列化及還原序列化期間,會使用序列化代理將類型替代為其他類型。A serialization surrogate is used during serialization and deserialization to substitute one type for another.

public interface class ISerializationSurrogateProvider
public interface ISerializationSurrogateProvider
type ISerializationSurrogateProvider = interface
Public Interface ISerializationSurrogateProvider

方法

GetDeserializedObject(Object, Type) GetDeserializedObject(Object, Type) GetDeserializedObject(Object, Type) GetDeserializedObject(Object, Type)

在還原序列化期間,傳回指定物件的替代物件。During deserialization, returns an object that is a substitute for the specified object.

GetObjectToSerialize(Object, Type) GetObjectToSerialize(Object, Type) GetObjectToSerialize(Object, Type) GetObjectToSerialize(Object, Type)

在序列化期間,傳回取代指定物件的物件。During serialization, returns an object that substitutes the specified object.

GetSurrogateType(Type) GetSurrogateType(Type) GetSurrogateType(Type) GetSurrogateType(Type)

在序列化、還原序列化,以及結構描述匯入和匯出期間,傳回要取代指定型別的資料合約型別。During serialization, deserialization, and schema import and export, returns a data contract type that substitutes the specified type.

適用於