EnterState() private method

private EnterState ( InternalEnlistment enlistment ) : void
enlistment InternalEnlistment
return void
Esempio n. 1
0
        internal override void Aborted(InternalEnlistment enlistment, Exception?e)
        {
            VolatileEnlistmentEnded.EnterState(enlistment);

            Debug.Assert(enlistment.Transaction.State != null);
            enlistment.Transaction.State.ChangeStateTransactionAborted(enlistment.Transaction, e);
        }
Esempio n. 2
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception?e)
        {
            VolatileEnlistmentEnded.EnterState(enlistment);

            enlistment.Transaction._innerException ??= e;

            Debug.Assert(enlistment.Transaction.State != null);
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
Esempio n. 3
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception e)
        {
            VolatileEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
Esempio n. 4
0
        // The enlistment says to abort start the abort sequence.
        internal override void ForceRollback(InternalEnlistment enlistment, Exception e)
        {
            // Change enlistment state to aborting
            VolatileEnlistmentEnded.EnterState(enlistment);

            // Start the transaction aborting
            enlistment.Transaction.State.ChangeStateTransactionAborted(enlistment.Transaction, e);

            // Process Finished InternalEnlistment
            enlistment.FinishEnlistment();
        }
Esempio n. 5
0
        // The enlistment says to abort start the abort sequence.
        internal override void ForceRollback(InternalEnlistment enlistment, Exception e)
        {
            // Change enlistment state to aborting
            VolatileEnlistmentEnded.EnterState(enlistment);

            // Record the exception in the transaction
            if (enlistment.Transaction._innerException == null)
            {
                // Arguably this is the second call to ForceRollback and not the call that
                // aborted the transaction but just in case.
                enlistment.Transaction._innerException = e;
            }

            // Process Finished InternalEnlistment
            enlistment.FinishEnlistment();
        }
Esempio n. 6
0
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     // Move this enlistment to the ended state
     VolatileEnlistmentEnded.EnterState(enlistment);
 }
Esempio n. 7
0
 internal override void Committed(InternalEnlistment enlistment)
 {
     VolatileEnlistmentEnded.EnterState(enlistment);
     enlistment.Transaction.State.ChangeStateTransactionCommitted(enlistment.Transaction);
 }
Esempio n. 8
0
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     VolatileEnlistmentEnded.EnterState(enlistment);
     Debug.Assert(enlistment.Transaction.State != null);
     enlistment.Transaction.State.ChangeStateTransactionCommitted(enlistment.Transaction);
 }