System.Transactions.TransactionStatePromotedBase.EnlistVolatile C# (CSharp) Method

EnlistVolatile() private method

private EnlistVolatile ( InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction ) : Enlistment
tx InternalTransaction
enlistmentNotification IEnlistmentNotification
enlistmentOptions EnlistmentOptions
atomicTransaction Transaction
return Enlistment
        internal override Enlistment EnlistVolatile(
            InternalTransaction tx,
            IEnlistmentNotification enlistmentNotification,
            EnlistmentOptions enlistmentOptions,
            Transaction atomicTransaction
            )
        {
            Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
            // Don't get in the way for new volatile enlistments

            // Don't hold locks while calling into the promoted tx
            Monitor.Exit(tx);
            try
            {
                Enlistment en = new Enlistment(enlistmentNotification, tx, atomicTransaction);
                EnlistmentState.EnlistmentStatePromoted.EnterState(en.InternalEnlistment);

                en.InternalEnlistment.PromotedEnlistment =
                    tx.PromotedTransaction.EnlistVolatile(
                        en.InternalEnlistment, enlistmentOptions);
                return en;
            }
            finally
            {
                Monitor.Enter(tx);
            }
        }

Same methods

TransactionStatePromotedBase::EnlistVolatile ( InternalTransaction tx, ISinglePhaseNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction ) : Enlistment