Пример #1
0
        public static IDtcTransaction GetDtcTransaction(Transaction transaction)
        {
            ArgumentNullException.ThrowIfNull(transaction);

            TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;

            if (etwLog.IsEnabled())
            {
                etwLog.MethodEnter(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            ConvertToDistributedTransaction(transaction);
            IDtcTransaction transactionNative = DistributedTransaction.GetDtcTransaction();

            if (etwLog.IsEnabled())
            {
                etwLog.MethodExit(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            return(transactionNative);
        }
Пример #2
0
        public static IDtcTransaction GetDtcTransaction(Transaction transaction)
        {
            if (null == transaction)
            {
                throw new ArgumentNullException(nameof(transaction));
            }

            if (DiagnosticTrace.Verbose)
            {
                MethodEnteredTraceRecord.Trace(SR.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            DistributedTransaction dTx = ConvertToDistributedTransaction(transaction);
            IDtcTransaction        transactionNative = dTx.GetDtcTransaction();

            if (DiagnosticTrace.Verbose)
            {
                MethodExitedTraceRecord.Trace(SR.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            return(transactionNative);
        }
        public static IDtcTransaction GetDtcTransaction(Transaction transaction)
        {
            if (null == transaction)
            {
                throw new ArgumentNullException(nameof(transaction));
            }

            TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;

            if (etwLog.IsEnabled())
            {
                etwLog.MethodEnter(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            DistributedTransaction dTx = ConvertToDistributedTransaction(transaction);
            IDtcTransaction        transactionNative = dTx.GetDtcTransaction();

            if (etwLog.IsEnabled())
            {
                etwLog.MethodExit(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetDtcTransaction");
            }

            return(transactionNative);
        }