System.Transactions.InternalTransaction.SetPromoterTypeToMSDTC C# (CSharp) Method

SetPromoterTypeToMSDTC() private method

private SetPromoterTypeToMSDTC ( ) : void
return void
        internal void SetPromoterTypeToMSDTC()
        {
            // The promoter type should either not yet be set or should already be TransactionInterop.PromoterTypeDtc in this case.
            if ((_promoterType != Guid.Empty) && (_promoterType != TransactionInterop.PromoterTypeDtc))
            {
                throw new InvalidOperationException(SR.PromoterTypeInvalid);
            }
            _promoterType = TransactionInterop.PromoterTypeDtc;
        }

Usage Example

Example #1
0
        internal Transaction(IsolationLevel isoLevel, ISimpleTransactionSuperior superior)
        {
            TransactionManager.ValidateIsolationLevel(isoLevel);
            ArgumentNullException.ThrowIfNull(superior);

            _isoLevel = isoLevel;

            // Never create a transaction with an IsolationLevel of Unspecified.
            if (IsolationLevel.Unspecified == _isoLevel)
            {
                _isoLevel = TransactionManager.DefaultIsolationLevel;
            }

            _internalTransaction = new InternalTransaction(this, superior);
            // ISimpleTransactionSuperior is defined to also promote to MSDTC.
            _internalTransaction.SetPromoterTypeToMSDTC();
            _cloneId = 1;
        }
All Usage Examples Of System.Transactions.InternalTransaction::SetPromoterTypeToMSDTC