public DependentTransaction DependentClone(DependentCloneOption cloneOption) { if (DiagnosticTrace.Verbose) { MethodEnteredTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), "Transaction.DependentClone"); } if ((cloneOption != DependentCloneOption.BlockCommitUntilComplete) && (cloneOption != DependentCloneOption.RollbackIfNotComplete)) { throw new ArgumentOutOfRangeException("cloneOption"); } if (this.Disposed) { throw new ObjectDisposedException("Transaction"); } if (this.complete) { throw TransactionException.CreateTransactionCompletedException(System.Transactions.SR.GetString("TraceSourceLtm")); } DependentTransaction transaction = new DependentTransaction(this.isoLevel, this.internalTransaction, cloneOption == DependentCloneOption.BlockCommitUntilComplete); if (DiagnosticTrace.Information) { DependentCloneCreatedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), transaction.TransactionTraceId, cloneOption); } if (DiagnosticTrace.Verbose) { MethodExitedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceLtm"), "Transaction.DependentClone"); } return(transaction); }
// Create a dependent clone of the transaction that forwards requests to this object. // public DependentTransaction DependentClone( DependentCloneOption cloneOption ) { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; if (etwLog.IsEnabled()) { etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this); } if (cloneOption != DependentCloneOption.BlockCommitUntilComplete && cloneOption != DependentCloneOption.RollbackIfNotComplete) { throw new ArgumentOutOfRangeException(nameof(cloneOption)); } ObjectDisposedException.ThrowIf(Disposed, this); if (_complete) { throw TransactionException.CreateTransactionCompletedException(DistributedTxId); } DependentTransaction clone = new DependentTransaction( _isoLevel, _internalTransaction, cloneOption == DependentCloneOption.BlockCommitUntilComplete); if (etwLog.IsEnabled()) { etwLog.TransactionCloneCreate(clone, "DependentTransaction"); etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this); } return(clone); }
public DependentTransaction DependentClone(DependentCloneOption option) { var d = new DependentTransaction(this, option); this.dependents.Add(d); return(d); }
internal DependentTransaction(Transaction parent, DependentCloneOption option) : base(parent.IsolationLevel) { // this.parent = parent; // this.option = option; }
public DependentTransaction DependentClone( DependentCloneOption cloneOption) { DependentTransaction d = new DependentTransaction(this, cloneOption); dependents.Add(d); return(d); }
internal static void Trace(string traceSource, TransactionTraceIdentifier txTraceId, DependentCloneOption option) { lock (record) { record.traceSource = traceSource; record.txTraceId = txTraceId; record.option = option; DiagnosticTrace.TraceEvent(TraceEventType.Information, "http://msdn.microsoft.com/2004/06/System/Transactions/DependentCloneCreated", System.Transactions.SR.GetString("TraceDependentCloneCreated"), record); } }
public DefaultTransactionOptions(IsolationLevel isolationLevel, TransactionScopeOption mode, bool fork, TimeSpan timeout, IEnumerable <KeyValuePair <string, object> > customContext, bool asyncRollback, bool asyncCommit, DependentCloneOption dependentCloneOption) { Contract.Requires(customContext != null); IsolationLevel = isolationLevel; Mode = mode; Fork = fork; Timeout = timeout; _CustomContext = customContext.ToDictionary(x => x.Key, x => x.Value); AsyncRollback = asyncRollback; AsyncCommit = asyncCommit; DependentOption = dependentCloneOption; }
// Create a dependent clone of the transaction that forwards requests to this object. // public DependentTransaction DependentClone( DependentCloneOption cloneOption ) { if (DiagnosticTrace.Verbose) { MethodEnteredTraceRecord.Trace(SR.TraceSourceLtm, "Transaction.DependentClone"); } if (cloneOption != DependentCloneOption.BlockCommitUntilComplete && cloneOption != DependentCloneOption.RollbackIfNotComplete) { throw new ArgumentOutOfRangeException(nameof(cloneOption)); } if (Disposed) { throw new ObjectDisposedException(nameof(Transaction)); } if (_complete) { throw TransactionException.CreateTransactionCompletedException(SR.TraceSourceLtm, DistributedTxId); } DependentTransaction clone = new DependentTransaction( _isoLevel, _internalTransaction, cloneOption == DependentCloneOption.BlockCommitUntilComplete); if (DiagnosticTrace.Information) { DependentCloneCreatedTraceRecord.Trace(SR.TraceSourceLtm, clone.TransactionTraceId, cloneOption); } if (DiagnosticTrace.Verbose) { MethodExitedTraceRecord.Trace(SR.TraceSourceLtm, "Transaction.DependentClone"); } return(clone); }
// Create a dependent clone of the transaction that forwards requests to this object. // /// <include file='doc\Transaction.uex' path='docs/doc[@for="Transaction.Clone"]/*' /> public DependentTransaction DependentClone( DependentCloneOption cloneOption ) { if (DiagnosticTrace.Verbose) { MethodEnteredTraceRecord.Trace(SR.GetString(SR.TraceSourceLtm), "Transaction.DependentClone" ); } if (cloneOption != DependentCloneOption.BlockCommitUntilComplete && cloneOption != DependentCloneOption.RollbackIfNotComplete) { throw new ArgumentOutOfRangeException("cloneOption"); } if (Disposed) { throw new ObjectDisposedException("Transaction"); } if (this.complete) { throw TransactionException.CreateTransactionCompletedException(SR.GetString(SR.TraceSourceLtm)); } DependentTransaction clone = new DependentTransaction( this.isoLevel, this.internalTransaction, cloneOption == DependentCloneOption.BlockCommitUntilComplete); if (DiagnosticTrace.Information) { DependentCloneCreatedTraceRecord.Trace(SR.GetString(SR.TraceSourceLtm), clone.TransactionTraceId, cloneOption ); } if (DiagnosticTrace.Verbose) { MethodExitedTraceRecord.Trace(SR.GetString(SR.TraceSourceLtm), "Transaction.DependentClone" ); } return clone; }
internal DependentTransaction (Transaction parent, DependentCloneOption option) { // this.parent = parent; // this.option = option; }
internal static void Trace(string traceSource, TransactionTraceIdentifier txTraceId, DependentCloneOption option) { lock (record) { record.traceSource = traceSource; record.txTraceId = txTraceId; record.option = option; DiagnosticTrace.TraceEvent(TraceEventType.Information, TransactionsTraceCode.DependentCloneCreated, SR.GetString(SR.TraceDependentCloneCreated), record); } }
internal DependentTransaction(Transaction parent, DependentCloneOption option) { // this.parent = parent; // this.option = option; }
public IDependentTransaction DependentClone(DependentCloneOption cloneOption) { return(this.Transaction.DependentClone(cloneOption).Cast()); }
public DependentTransaction DependentClone(DependentCloneOption cloneOption) { }
// Create a dependent clone of the transaction that forwards requests to this object. // public DependentTransaction DependentClone( DependentCloneOption cloneOption ) { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; if (etwLog.IsEnabled()) { etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this); } if (cloneOption != DependentCloneOption.BlockCommitUntilComplete && cloneOption != DependentCloneOption.RollbackIfNotComplete) { throw new ArgumentOutOfRangeException(nameof(cloneOption)); } if (Disposed) { throw new ObjectDisposedException(nameof(Transaction)); } if (_complete) { throw TransactionException.CreateTransactionCompletedException(DistributedTxId); } DependentTransaction clone = new DependentTransaction( _isoLevel, _internalTransaction, cloneOption == DependentCloneOption.BlockCommitUntilComplete); if (etwLog.IsEnabled()) { etwLog.TransactionCloneCreate(clone, "DependentTransaction"); etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this); } return clone; }
public DependentTransaction DependentClone ( DependentCloneOption option) { DependentTransaction d = new DependentTransaction (this, option); dependents.Add (d); return d; }
internal static void Trace(string traceSource, TransactionTraceIdentifier txTraceId, DependentCloneOption option) { lock (record) { record.traceSource = traceSource; record.txTraceId = txTraceId; record.option = option; DiagnosticTrace.TraceEvent(TraceEventType.Information, TransactionsTraceCode.DependentCloneCreated, SR.GetString( SR.TraceDependentCloneCreated ), record); } }