SerializationContextTransactionExtensions.GetSerializationContext Method

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.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetSerializationContext ( _
    transaction As Transaction _
) As SerializationContext
public static SerializationContext GetSerializationContext(
    this Transaction transaction
)
[ExtensionAttribute]
public:
static SerializationContext^ GetSerializationContext(
    Transaction^ transaction
)
static member GetSerializationContext : 
        transaction:Transaction -> SerializationContext
public static function GetSerializationContext(
    transaction : Transaction
) : SerializationContext

Parameters

Return Value

Type: Microsoft.VisualStudio.Modeling.SerializationContext
The SerializationContext active in the nearest enclosing serialization transaction, or null if none

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Transaction. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

SerializationContextTransactionExtensions Class

Microsoft.VisualStudio.Modeling Namespace