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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應