This topic has not yet been rated - Rate this topic

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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
public static SerializationContext GetSerializationContext(
	this Transaction transaction
)

Parameters

transaction
Type: Microsoft.VisualStudio.Modeling.Transaction
The Transaction from which the search for a SerializatioContext starts

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).
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ