Share via


GraphTransactionScope 類別

表示 System.Transactions.TransactionScope 的高度最佳化包裝函式。 這會廣泛地使用執行緒區域儲存區,因而形成執行緒繫結。 GraphTransactionScope 是用來從 using() 類別呼叫,與 TransactionScope 相同。

繼承階層架構

Object
  Microsoft.VisualStudio.GraphModel.GraphTransactionScope
    Microsoft.VisualStudio.GraphModel.UndoableGraphTransactionScope

命名空間:  Microsoft.VisualStudio.GraphModel
組件:  Microsoft.VisualStudio.GraphModel (在 Microsoft.VisualStudio.GraphModel.dll 中)

語法

'宣告
Public Class GraphTransactionScope _
    Implements IDisposable
public class GraphTransactionScope : IDisposable
public ref class GraphTransactionScope : IDisposable
type GraphTransactionScope =  
    class 
        interface IDisposable 
    end
public class GraphTransactionScope implements IDisposable

GraphTransactionScope 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 GraphTransactionScope() 建構函式。這會使用 TLS 變數將此 GraphTransactionScope 與外部範圍區塊中的對等項產生關聯。
公用方法 GraphTransactionScope(String) 建構函式。這會使用 TLS 變數將此 GraphTransactionScope 與外部範圍區塊中的對等項產生關聯。
公用方法 GraphTransactionScope(Transaction) 建構函式。這會使用 TLS 變數將此 GraphTransactionScope 與外部範圍區塊中的對等項產生關聯。
公用方法 GraphTransactionScope(GraphTransactionScopeOptions) 建構函式。這會使用 TLS 變數將此 GraphTransactionScope 與外部範圍區塊中的對等項產生關聯。

回頁首

屬性

  名稱 描述
公用屬性 ScopeProperties 與這個範圍相關聯的屬性包。

回頁首

方法

  名稱 描述
公用方法 Complete 標記為已完成。Dispose 將會檢查這點,如果沒有這樣呼叫,異動就會中止。
公用方法 Dispose() IDisposable.Dispose。
受保護的方法 Dispose(Boolean) Dispose 實作
公用方法 Equals 判斷指定的物件是否等於目前的物件。 (繼承自 Object)。
受保護的方法 Finalize 在記憶體回收開始前,允許物件嘗試釋放資源,並執行其他清除作業。 (繼承自 Object)。
公用方法 GetHashCode 做為預設雜湊函式。 (繼承自 Object)。
公用方法 GetType 取得目前實例 Type 的屬性。 (繼承自 Object)。
受保護的方法 MemberwiseClone 建立目前 Object 的淺層複製 (Shallow Copy) 。 (繼承自 Object)。
公用方法 ToString 傳回代表目前物件的字串。 (繼承自 Object)。

回頁首

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.GraphModel 命名空間