ActivitySurrogateSelector::GetSurrogate Method (Type^, StreamingContext, ISurrogateSelector^%)

 

Finds the surrogate that represents the specified type, starting with the specified surrogate selector for the specified serialization context.

Namespace:   System.Workflow.ComponentModel.Serialization
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public:
virtual ISerializationSurrogate^ GetSurrogate(
	Type^ type,
	StreamingContext context,
	[OutAttribute] ISurrogateSelector^% selector
) override

Parameters

type
Type: System::Type^

The Type for which to obtain a surrogate.

context
Type: System.Runtime.Serialization::StreamingContext

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

selector
Type: System.Runtime.Serialization::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.

Return Value

Type: System.Runtime.Serialization::ISerializationSurrogate^

The appropriate surrogate for the specified type and context.

Exception Condition
ArgumentNullException

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

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

.NET Framework
Available since 3.0
Return to top
Show: