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

PSPEInitialize() private method

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

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

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