コード例 #1
0
 /// <summary>
 /// Performs necessary rollback actions, clearing the current <see cref="TransactionContext"/>
 /// </summary>
 public void Rollback(Enlistment enlistment)
 {
     DoRollback();
     enlistment.Done();
     TransactionContext.Clear();
     AfterRollback();
 }
コード例 #2
0
 /// <summary>
 /// Performs necessary commit actions, clearing the current <see cref="TransactionContext"/>
 /// </summary>
 public void Commit(Enlistment enlistment)
 {
     BeforeCommit();
     DoCommit();
     TransactionContext.Clear();
     enlistment.Done();
 }
コード例 #3
0
 /// <summary>
 /// Does nothing
 /// </summary>
 public void InDoubt(Enlistment enlistment)
 {
     try
     {
         enlistment.Done();
     }
     finally
     {
         TransactionContext.Clear();
     }
 }
コード例 #4
0
 /// <summary>
 /// Runs the cleanup method, ensuring that the currently thread-bound transaction context is cleared
 /// </summary>
 public void RunCleanup()
 {
     try
     {
         Cleanup();
     }
     finally
     {
         TransactionContext.Clear();
     }
 }
コード例 #5
0
        internal void Run()
        {
            Tuple <SendOrPostCallback, object, ITransactionContext> tuple;

            while (callbacks.TryDequeue(out tuple))
            {
                TransactionContext.Set(tuple.Item3);
                tuple.Item1(tuple.Item2);
                TransactionContext.Clear();
            }
        }
コード例 #6
0
ファイル: NoTransaction.cs プロジェクト: rasmuskl/Rebus
 public void Dispose()
 {
     TransactionContext.Clear();
     Cleanup();
 }