共用方式為


ISerializationSurrogate 介面

定義

警告

Formatter-based serialization is obsolete and should not be used.

實作允許一個物件執行另一個物件序列化 (Serialization) 和還原序列化 (Deserialization) 的序列化代理選取器。

public interface class ISerializationSurrogate
public interface ISerializationSurrogate
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public interface ISerializationSurrogate
[System.Runtime.InteropServices.ComVisible(true)]
public interface ISerializationSurrogate
type ISerializationSurrogate = interface
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type ISerializationSurrogate = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type ISerializationSurrogate = interface
Public Interface ISerializationSurrogate
屬性

方法

GetObjectData(Object, SerializationInfo, StreamingContext)
已淘汰.

將序列化物件所需的資料填入 (Populate) 所提供的 SerializationInfo

SetObjectData(Object, SerializationInfo, StreamingContext, ISurrogateSelector)
已淘汰.

使用 SerializationInfo 中的資訊填入物件。

適用於