Comparteix a través de


SurrogateSelector.AddSurrogate Método

Definición

Agrega un suplente a la lista de suplentes comprobados.

public:
 virtual void AddSurrogate(Type ^ type, System::Runtime::Serialization::StreamingContext context, System::Runtime::Serialization::ISerializationSurrogate ^ surrogate);
public virtual void AddSurrogate (Type type, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISerializationSurrogate surrogate);
abstract member AddSurrogate : Type * System.Runtime.Serialization.StreamingContext * System.Runtime.Serialization.ISerializationSurrogate -> unit
override this.AddSurrogate : Type * System.Runtime.Serialization.StreamingContext * System.Runtime.Serialization.ISerializationSurrogate -> unit
Public Overridable Sub AddSurrogate (type As Type, context As StreamingContext, surrogate As ISerializationSurrogate)

Parámetros

type
Type

Type para el que se requiere el suplente.

context
StreamingContext

Datos específicos del contexto.

surrogate
ISerializationSurrogate

Suplente que se va a llamar para este tipo.

Excepciones

El parámetro type o surrogate es null.

Ya existe un suplente para este tipo y contexto.

Se aplica a