System.Transactions.Transaction.InternalClone C# (CSharp) Method

InternalClone() private method

private InternalClone ( ) : Transaction
return Transaction
        internal Transaction InternalClone()
        {
            Transaction clone = new Transaction(_isoLevel, _internalTransaction);

            TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
            if (etwLog.IsEnabled())
            {
                etwLog.TransactionCloneCreate(clone, "Transaction");
            }

            return clone;
        }

Usage Example

Example #1
0
        internal static Transaction FindPromotedTransaction(
            Guid transactionIdentifier
            )
        {
            Hashtable     promotedTransactionTable = PromotedTransactionTable;
            WeakReference weakRef = (WeakReference)promotedTransactionTable[transactionIdentifier];

            if (null != weakRef)
            {
                Transaction tx = weakRef.Target as Transaction;
                if (null != tx)
                {
                    return(tx.InternalClone());
                }
                else      // an old, moldy weak reference.  Let's get rid of it.
                {
                    lock ( promotedTransactionTable )
                    {
                        promotedTransactionTable.Remove(transactionIdentifier);
                    }
                }
            }

            return(null);
        }
All Usage Examples Of System.Transactions.Transaction::InternalClone