ActivitySurrogateSelector.GetSurrogate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om