ערוך

שתף באמצעות


SurrogateSelector Class

Definition

Caution

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

Assists formatters in selection of the serialization surrogate to delegate the serialization or deserialization process to.

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
Inheritance
SurrogateSelector
Derived
Attributes
Implements

Remarks

A serialization surrogate gives the users an object that can handle the serialization requirements of a different object and can transform the serialized data if necessary.

Constructors

SurrogateSelector()

Initializes a new instance of the SurrogateSelector class.

Methods

AddSurrogate(Type, StreamingContext, ISerializationSurrogate)

Adds a surrogate to the list of checked surrogates.

ChainSelector(ISurrogateSelector)

Adds the specified ISurrogateSelector that can handle a particular object type to the list of surrogates.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNextSelector()

Returns the next selector on the chain of selectors.

GetSurrogate(Type, StreamingContext, ISurrogateSelector)

Returns the surrogate for a particular type.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveSurrogate(Type, StreamingContext)

Removes the surrogate associated with a given type.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to