System.Transactions.Tests.NonMsdtcPromoterTests.CreateVolatileEnlistment C# (CSharp) Метод

CreateVolatileEnlistment() приватный статический Метод

private static CreateVolatileEnlistment ( AutoResetEvent outcomeReceived, Transaction tx = null, EnlistmentOptions options = EnlistmentOptions.None, bool votePrepared = true ) : MyEnlistment
outcomeReceived System.Threading.AutoResetEvent
tx Transaction
options EnlistmentOptions
votePrepared bool
Результат MyEnlistment
        private static MyEnlistment CreateVolatileEnlistment(
            AutoResetEvent outcomeReceived,
            Transaction tx = null,
            EnlistmentOptions options = EnlistmentOptions.None,
            bool votePrepared = true)
        {
            MyEnlistment enlistment = new MyEnlistment(outcomeReceived, votePrepared);
            Transaction txToEnlist = Transaction.Current;
            if (tx != null)
            {
                txToEnlist = tx;
            }
            txToEnlist.EnlistVolatile(enlistment, options);
            return enlistment;
        }
NonMsdtcPromoterTests