ActivitySurrogateSelector.GetSurrogate(Type, StreamingContext, ISurrogateSelector) Método
Definição
Localiza o substituto que representa o tipo especificado, começando com o seletor de substitutos especificado para o contexto de serialização especificado.Finds the surrogate that represents the specified type, starting with the specified surrogate selector for the specified serialization context.
public:
override System::Runtime::Serialization::ISerializationSurrogate ^ GetSurrogate(Type ^ type, System::Runtime::Serialization::StreamingContext context, [Runtime::InteropServices::Out] System::Runtime::Serialization::ISurrogateSelector ^ % selector);
public override System.Runtime.Serialization.ISerializationSurrogate GetSurrogate (Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector);
override this.GetSurrogate : Type * System.Runtime.Serialization.StreamingContext * ISurrogateSelector -> System.Runtime.Serialization.ISerializationSurrogate
Public Overrides Function GetSurrogate (type As Type, context As StreamingContext, ByRef selector As ISurrogateSelector) As ISerializationSurrogate
Parâmetros
- context
- StreamingContext
Um StreamingContext que serve como o contexto de origem ou de destino da serialização atual.A StreamingContext that serves as the source or destination context for the current serialization.
- selector
- ISurrogateSelector
Quando esse método retorna, contém um ISurrogateSelector com uma referência para o seletor substituto no qual o substituto adequado foi encontrado.When this method returns, contains an ISurrogateSelector that holds a reference to the surrogate selector where the appropriate surrogate was found. Este parâmetro é passado não inicializado.This parameter is passed uninitialized.
Retornos
O substituto adequado para o tipo e o contexto especificados.The appropriate surrogate for the specified type and context.
Exceções
type contém uma referência nula (Nothing no Visual Basic).type contains a null reference (Nothing in Visual Basic).
Comentários
O tipo de substituto retornado depende de qual tipo é atribuível type .The type of surrogate returned is dependent upon what type is assignable from type.