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

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

private EnterState ( InternalTransaction tx ) : void
tx InternalTransaction
Результат void
        internal override void EnterState(InternalTransaction tx)
        {
            // Set the transaction state
            CommonEnterState(tx);

            // Mark the committable transaction as complete.
            tx._committableTransaction._complete = true;

            // If at this point there are phase1 dependent clones abort the transaction
            if (tx._phase1Volatiles._dependentClones != 0)
            {
                ChangeStateTransactionAborted(tx, null);
                return;
            }

            if (tx._phase1Volatiles._volatileEnlistmentCount > 0)
            {
                // Broadcast prepare to the phase 0 enlistments
                for (int i = 0; i < tx._phase1Volatiles._volatileEnlistmentCount; i++)
                {
                    tx._phase1Volatiles._volatileEnlistments[i]._twoPhaseState.ChangeStatePreparing(tx._phase1Volatiles._volatileEnlistments[i]);
                    if (!tx.State.ContinuePhase1Prepares())
                    {
                        break;
                    }
                }
            }
            else
            {
                // No volatile phase 1 enlistments.  Transition to the state that will do SinglePhaseCommit to the PSPE.
                TransactionStatePromotedNonMSDTCSinglePhaseCommit.EnterState(tx);
            }
        }