AtomicComposition AtomicComposition AtomicComposition AtomicComposition Class

定義

表示交易性撰寫的單一撰寫作業。Represents a single composition operation for transactional composition.

public ref class AtomicComposition : IDisposable
public class AtomicComposition : IDisposable
type AtomicComposition = class
    interface IDisposable
Public Class AtomicComposition
Implements IDisposable
繼承
AtomicCompositionAtomicCompositionAtomicCompositionAtomicComposition
實作

備註

重要

此類型會實作IDisposable介面。This type implements the IDisposable interface. 當您完成使用型別時,您應該處置它直接或間接。When you have finished using the type, you should dispose of it either directly or indirectly. 若要直接處置型別,呼叫其Dispose方法中的try / catch區塊。To dispose of the type directly, call its Dispose method in a try/catch block. 若要處置它間接,使用的語言建構這類using(在 C# 中) 或Using(在 Visual Basic)。To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). 如需詳細資訊,請參閱 「 使用物件,實作 IDisposable 」 一節IDisposable介面 > 主題。For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.

建構函式

AtomicComposition() AtomicComposition() AtomicComposition() AtomicComposition()

初始化 AtomicComposition 類別的新執行個體。Initializes a new instance of the AtomicComposition class.

AtomicComposition(AtomicComposition) AtomicComposition(AtomicComposition) AtomicComposition(AtomicComposition) AtomicComposition(AtomicComposition)

使用指定的父 AtomicComposition 初始化 AtomicComposition 類別的新執行個體。Initializes a new instance of the AtomicComposition class with the specified parent AtomicComposition.

方法

AddCompleteAction(Action) AddCompleteAction(Action) AddCompleteAction(Action) AddCompleteAction(Action)

加入當整體撰寫作業成功完成時要執行的動作。Adds an action to be executed when the overall composition operation completes successfully.

AddRevertAction(Action) AddRevertAction(Action) AddRevertAction(Action) AddRevertAction(Action)

加入當整體撰寫作業失敗時要執行的動作。Adds an action to be executed if the overall composition operation fails.

Complete() Complete() Complete() Complete()

將這個撰寫作業標記為完成。Marks this composition operation as complete.

Dispose() Dispose() Dispose() Dispose()

釋放 AtomicComposition 類別目前的執行個體所使用的所有資源,並且將這個撰寫作業標記為失敗。Releases all resources used by the current instance of the AtomicComposition class, and mark this composition operation as failed.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 AtomicComposition 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the AtomicComposition and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
SetValue(Object, Object) SetValue(Object, Object) SetValue(Object, Object) SetValue(Object, Object)

儲存交易中的機碼值組以追蹤暫訂狀態。Saves a key-value pair in the transaction to track tentative state.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetValue<T>(Object, Boolean, T) TryGetValue<T>(Object, Boolean, T) TryGetValue<T>(Object, Boolean, T) TryGetValue<T>(Object, Boolean, T)

在選擇不搜尋父交易的情況下,取得由 SetValue(Object, Object) 方法所儲存的值。Gets a value saved by the SetValue(Object, Object) method, with the option of not searching parent transactions.

TryGetValue<T>(Object, T) TryGetValue<T>(Object, T) TryGetValue<T>(Object, T) TryGetValue<T>(Object, T)

取得由 SetValue(Object, Object) 方法所儲存的值。Gets a value saved by the SetValue(Object, Object) method.

適用於