SurrogateSelector 類別

定義

警告

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

在序列化 (Serialization) 代理的選取方面協助格式子 (Formatter),以委派 (Delegate) 序列化或還原序列化 (Deserialization) 處理序。

public ref class SurrogateSelector : System::Runtime::Serialization::ISurrogateSelector
public class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
[System.Runtime.InteropServices.ComVisible(true)]
public class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector
type SurrogateSelector = class
    interface ISurrogateSelector
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SurrogateSelector = class
    interface ISurrogateSelector
[<System.Runtime.InteropServices.ComVisible(true)>]
type SurrogateSelector = class
    interface ISurrogateSelector
Public Class SurrogateSelector
Implements ISurrogateSelector
繼承
SurrogateSelector
衍生
屬性
實作

備註

序列化代理可為使用者提供一個物件,該物件可以處理不同物件的序列化需求,並視需要轉換序列化的資料。

建構函式

SurrogateSelector()
已淘汰.

初始化 SurrogateSelector 類別的新執行個體。

方法

AddSurrogate(Type, StreamingContext, ISerializationSurrogate)
已淘汰.

將代理加入至已檢查代理的清單中。

ChainSelector(ISurrogateSelector)
已淘汰.

將可以控制特定物件型別的指定 ISurrogateSelector 加入至代理清單。

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetNextSelector()
已淘汰.

傳回在選取器鏈結上的下一個選取器。

GetSurrogate(Type, StreamingContext, ISurrogateSelector)
已淘汰.

傳回特定型別的代理。

GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
RemoveSurrogate(Type, StreamingContext)
已淘汰.

移除與指定型別相關聯的代理。

ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於