void System.Transactions.IEnlistmentNotification.Prepare(System.Transactions.PreparingEnlistment preparingEnlistment) { if (this.aborted) { preparingEnlistment.ForceRollback(); this.Rollback(); this.Release(); preparingEnlistment.Done(); } else { preparingEnlistment.Prepared(); } }
void System.Transactions.IEnlistmentNotification.Rollback(System.Transactions.Enlistment enlistment) { ////bool timeout = Transaction.current != this; // Rollback can be concurrent (timeout) this.EnterAtomicSection(); this.aborted = true; this.Rollback(); this.Release(); this.ExitAtomicSection(); enlistment.Done(); }
void System.Transactions.IEnlistmentNotification.Commit(System.Transactions.Enlistment enlistment) { this.Commit(); this.Release(); enlistment.Done(); }