System.Transactions.VolatileEnlistmentAborting.EnterState C# (CSharp) Метод

EnterState() приватный Метод

private EnterState ( InternalEnlistment enlistment ) : void
enlistment InternalEnlistment
Результат void
        internal override void EnterState(InternalEnlistment enlistment)
        {
            // Set the enlistment state
            enlistment.State = this;

            Monitor.Exit(enlistment.Transaction);
            try // Don't hold this lock while calling into the application code.
            {
                TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
                if (etwLog.IsEnabled())
                {
                    etwLog.EnlistmentStatus(enlistment, NotificationCall.Rollback);
                }

                enlistment.EnlistmentNotification.Rollback(enlistment.SinglePhaseEnlistment);
            }
            finally
            {
                Monitor.Enter(enlistment.Transaction);
            }
        }

Usage Example

Пример #1
0
        internal override void Prepared(InternalEnlistment enlistment)
        {
            // The enlistment has respondend so changes it's state to aborting.
            VolatileEnlistmentAborting.EnterState(enlistment);

            // Process Finished InternalEnlistment
            enlistment.FinishEnlistment();
        }
All Usage Examples Of System.Transactions.VolatileEnlistmentAborting::EnterState