System.Transactions.InternalTransaction.SignalAsyncCompletion C# (CSharp) Method

SignalAsyncCompletion() private method

private SignalAsyncCompletion ( ) : void
return void
        internal void SignalAsyncCompletion()
        {
            if (_asyncResultEvent != null)
            {
                _asyncResultEvent.Set();
            }

            if (_asyncCallback != null)
            {
                Monitor.Exit(this); // Don't hold a lock calling user code.
                try
                {
                    _asyncCallback(_committableTransaction);
                }
                finally
                {
                    Monitor.Enter(this);
                }
            }
        }

Usage Example

Example #1
0
 internal override void EnterState(InternalTransaction tx)
 {
     base.EnterState(tx);
     base.CommonEnterState(tx);
     for (int i = 0; i < tx.phase0Volatiles.volatileEnlistmentCount; i++)
     {
         tx.phase0Volatiles.volatileEnlistments[i].twoPhaseState.InternalAborted(tx.phase0Volatiles.volatileEnlistments[i]);
     }
     for (int j = 0; j < tx.phase1Volatiles.volatileEnlistmentCount; j++)
     {
         tx.phase1Volatiles.volatileEnlistments[j].twoPhaseState.InternalAborted(tx.phase1Volatiles.volatileEnlistments[j]);
     }
     if (tx.durableEnlistment != null)
     {
         tx.durableEnlistment.State.InternalAborted(tx.durableEnlistment);
     }
     TransactionManager.TransactionTable.Remove(tx);
     if (DiagnosticTrace.Warning)
     {
         TransactionAbortedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), tx.TransactionTraceId);
     }
     tx.FireCompletion();
     if (tx.asyncCommit)
     {
         tx.SignalAsyncCompletion();
     }
 }
All Usage Examples Of System.Transactions.InternalTransaction::SignalAsyncCompletion