共用方式為


ILinkedUndoTransaction.Abort Method

Definition

Abort this transaction. Attempt to rollback the changes made in the current transaction, else throw an exception. ILinkedUndoContext.BeginTransaction and ILinkedUndoTransaction.Commit/ILinkedUndoTransaction.Abort are always called in pairs. The implementation should be invariant to nested calls to this pair and still maintain the notion of one top-level transaction.
Dispose on the Transaction when Commit has not been called will call Abort.

public:
 void Abort();
public void Abort ();
abstract member Abort : unit -> unit
Public Sub Abort ()

Exceptions

Thrown if the transaction is not open.

Applies to