共用方式為


Formatter.SurrogateSelector 屬性

定義

當覆寫於衍生類別時,取得或設定與目前的格式子使用的 ISurrogateSelector

public:
 abstract property System::Runtime::Serialization::ISurrogateSelector ^ SurrogateSelector { System::Runtime::Serialization::ISurrogateSelector ^ get(); void set(System::Runtime::Serialization::ISurrogateSelector ^ value); };
public abstract System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get; set; }
public abstract System.Runtime.Serialization.ISurrogateSelector SurrogateSelector { get; set; }
member this.SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector with get, set
Public MustOverride Property SurrogateSelector As ISurrogateSelector

屬性值

搭配目前格式器使用的 ISurrogateSelector

實作

備註

SurrogateSelector使用 查詢的ISerializationSurrogate實作,以控制特定型別的串行化。

如果物件類型具有相符的 Surrogate,則即使型別實 ISerializable 作 介面,串行化和還原串行化仍會交給 Surrogate。

給實施者的注意事項

您必須在衍生類別中實作此屬性。

適用於