Share via


SerializationContextTransactionExtensions.GetSerializationContext Method

Definition

Get the SerializationContext active in the context of the specified transaction. The SerializationContext is stored in the TranactionContext of serializing transactions. If the transaction is nested the transaction stack is searched to find the nearest enclosing serialization transaction with a SerializationContext.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Modeling::SerializationContext ^ GetSerializationContext(Microsoft::VisualStudio::Modeling::Transaction ^ transaction);
public static Microsoft.VisualStudio.Modeling.SerializationContext GetSerializationContext (this Microsoft.VisualStudio.Modeling.Transaction transaction);
static member GetSerializationContext : Microsoft.VisualStudio.Modeling.Transaction -> Microsoft.VisualStudio.Modeling.SerializationContext
<Extension()>
Public Function GetSerializationContext (transaction As Transaction) As SerializationContext

Parameters

transaction
Transaction

The Transaction from which the search for a SerializatioContext starts

Returns

The SerializationContext active in the nearest enclosing serialization transaction, or null if none

Applies to