次の方法で共有


TransactionManager Class

Creates Transaction objects and keeps track of the current active transaction.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.TransactionManager

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

Syntax

'宣言
Public Class TransactionManager
public class TransactionManager
public ref class TransactionManager
type TransactionManager =  class end
public class TransactionManager

The TransactionManager type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Public property CurrentTransaction Gets the current active transaction.
Public property InTransaction True if there is an active transaction.
Public property Store Gets the store that this TransactionManager is part of.
Public property TransactionDepth Gets the depth of the nested transactions.

Top

Methods

  Name Description
Public method AddCanCommitCallback Register a delegate that can vote on whether a Commit() is allowed.
Public method BeginTransaction() Creates a new transaction object with a given name and returns a reference to it.
Public method BeginTransaction(String) Creates a new transaction object with a given name and returns a reference to it.
Public method BeginTransaction(String, Boolean) Creates a new transaction object with a given name and returns a reference to it.
Public method BeginTransaction(String, Boolean, TransactionContext) Creates a new transaction object with a given name and returns a reference to it
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 RemoveCanCommitCallback Removes a delegate from the voting list.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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

Change History

Date

History

Reason

July 2010

Added info.

Customer feedback.