Export (0) Print
Expand All

CommittableTransaction.BeginCommit Method

Begins an attempt to commit the transaction asynchronously.

Namespace:  System.Transactions
Assembly:  System.Transactions (in System.Transactions.dll)

public IAsyncResult BeginCommit(
	AsyncCallback asyncCallback,
	Object asyncState
)

Parameters

asyncCallback
Type: System.AsyncCallback
The AsyncCallback delegate that is invoked when the transaction completes. This parameter can be null, in which case the application is not notified of the transaction's completion. Instead, the application must use the IAsyncResult interface to check for completion and wait accordingly, or call EndCommit to wait for completion.
asyncState
Type: System.Object
An object, which might contain arbitrary state information, associated with the asynchronous commitment. This object is passed to the callback, and is not interpreted by System.Transactions. A null reference is permitted.

Return Value

Type: System.IAsyncResult
An IAsyncResult interface that can be used by the caller to check the status of the asynchronous operation, or to wait for the operation to complete.

This method returns immediately, before the transaction has been completed. The transaction then commits on a different thread, and the asyncCallback delegate is invoked when it has completed. After this method is called, you do not receive the outcome of the transaction until you call EndCommit.

NoteNote

The commit process may complete synchronously inside this method call.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft