System.Transactions.EnlistableStates.EnlistDurable C# (CSharp) Метод

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

private EnlistDurable ( InternalTransaction tx, System.Guid resourceManagerIdentifier, ISinglePhaseNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction ) : Enlistment
tx InternalTransaction
resourceManagerIdentifier System.Guid
enlistmentNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
atomicTransaction Transaction
Результат Enlistment
        internal override Enlistment EnlistDurable(
            InternalTransaction tx,
            Guid resourceManagerIdentifier,
            ISinglePhaseNotification enlistmentNotification,
            EnlistmentOptions enlistmentOptions,
            Transaction atomicTransaction)
        {
            tx.ThrowIfPromoterTypeIsNotMSDTC();

            if (tx._durableEnlistment != null || (enlistmentOptions & EnlistmentOptions.EnlistDuringPrepareRequired) != 0)
            {
                // These circumstances cause promotion
                tx._promoteState.EnterState(tx);
                return tx.State.EnlistDurable(tx, resourceManagerIdentifier, enlistmentNotification, enlistmentOptions, atomicTransaction);
            }

            // Create a durable enlistment
            Enlistment en = new Enlistment(resourceManagerIdentifier, tx, enlistmentNotification, enlistmentNotification, atomicTransaction);
            tx._durableEnlistment = en.InternalEnlistment;
            DurableEnlistmentState.DurableEnlistmentActive.EnterState(tx._durableEnlistment);

            TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
            if (etwLog.IsEnabled())
            {
                etwLog.TransactionstateEnlist(tx._durableEnlistment.EnlistmentTraceId, EnlistmentType.Durable, EnlistmentOptions.None);
            }

            return en;
        }

Same methods

EnlistableStates::EnlistDurable ( InternalTransaction tx, System.Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction ) : Enlistment