Condividi tramite


TransactionContext Class

Stores user data in a transaction.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.TransactionContext

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

Syntax

'Dichiarazione
Public Class TransactionContext
public class TransactionContext
public ref class TransactionContext
type TransactionContext =  class end
public class TransactionContext

The TransactionContext type exposes the following members.

Constructors

  Name Description
Public method TransactionContext Initializes a new instance of the TransactionContext class.

Top

Properties

  Name Description
Public property ContextInfo Gets context information.
Public property TransactionId The Id of the containing Transaction

Top

Methods

  Name Description
Public method Add Associate a value with a particular key in the transaction context.
Public method Contains Query whether the specified key has been associated with a value in this transaction context
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Remove the association between the specified key and its value from the transaction context, if any.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetValue<T> Lookup the value associated with a specified key in the transaction context.

Top

Remarks

Particularly useful for passing data between rules. For examples and more information, see Using Transactions.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace