System.Transactions.TransactionStatePSPEOperation.Phase0PSPEInitialize C# (CSharp) Method

Phase0PSPEInitialize() private method

private Phase0PSPEInitialize ( InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, System.Guid promoterType ) : void
tx InternalTransaction
promotableSinglePhaseNotification IPromotableSinglePhaseNotification
promoterType System.Guid
return void
        internal void Phase0PSPEInitialize(
            InternalTransaction tx,
            IPromotableSinglePhaseNotification promotableSinglePhaseNotification,
            Guid promoterType)
        {
            Debug.Assert(tx.State == TransactionStatePhase0, "Phase0PSPEInitialize called from state other than TransactionStatePhase0");
            CommonEnterState(tx);

            try
            {
                // Try to initialize the PSPE.  If an exception is thrown let it propagate
                // all the way up to the caller.
                promotableSinglePhaseNotification.Initialize();

                // Set the PromoterType for the transaction.
                tx._promoterType = promoterType;
            }
            finally
            {
                TransactionStatePhase0.CommonEnterState(tx);
            }
        }