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

ThrowIfPromoterTypeIsNotMSDTC() private method

private ThrowIfPromoterTypeIsNotMSDTC ( ) : void
return void
        internal void ThrowIfPromoterTypeIsNotMSDTC()
        {
            if ((_promoterType != Guid.Empty) && (_promoterType != TransactionInterop.PromoterTypeDtc))
            {
                throw new TransactionPromotionException(SR.Format(SR.PromoterTypeUnrecognized, _promoterType.ToString()), _innerException);
            }
        }

Usage Example

Example #1
0
 internal DistributedTransaction Promote()
 {
     lock (_internalTransaction)
     {
         // This method is only called when we expect to be promoting to MSDTC.
         _internalTransaction.ThrowIfPromoterTypeIsNotMSDTC();
         _internalTransaction.State.Promote(_internalTransaction);
         return(_internalTransaction.PromotedTransaction);
     }
 }
All Usage Examples Of System.Transactions.InternalTransaction::ThrowIfPromoterTypeIsNotMSDTC