System.Transactions.VolatileEnlistmentPreparingAborting.ForceRollback C# (CSharp) Method

ForceRollback() private method

private ForceRollback ( InternalEnlistment enlistment, Exception e ) : void
enlistment InternalEnlistment
e Exception
return void
        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();
        }