संपादित करें

इसके माध्यम से साझा किया गया


ActivitySurrogateSelector.GetSurrogate Method

Definition

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

Parameters

type
Type

The Type for which to obtain a surrogate.

context
StreamingContext

A StreamingContext that serves as the source or destination context for the current serialization.

selector
ISurrogateSelector

When this method returns, contains an ISurrogateSelector that holds a reference to the surrogate selector where the appropriate surrogate was found. This parameter is passed uninitialized.

Returns

The appropriate surrogate for the specified type and context.

Exceptions

type contains a null reference (Nothing in Visual Basic).

Remarks

The type of surrogate returned is dependent upon what type is assignable from type.

Applies to