public void Complete() { if (DiagnosticTrace.Verbose) { MethodEnteredTraceRecord.Trace(SR.GetString(SR.TraceSourceOletx), "DependentTransaction.Complete" ); } Debug.Assert((0 == this.disposed), "OletxTransction object is disposed"); int localCompleted = Interlocked.CompareExchange(ref this.completed, 1, 0); if (1 == localCompleted) { throw TransactionException.CreateTransactionCompletedException(SR.GetString(SR.TraceSourceOletx)); } if (DiagnosticTrace.Information) { DependentCloneCompleteTraceRecord.Trace(SR.GetString(SR.TraceSourceOletx), this.TransactionTraceId ); } this.volatileEnlistmentContainer.DependentCloneCompleted(); if (DiagnosticTrace.Verbose) { MethodExitedTraceRecord.Trace(SR.GetString(SR.TraceSourceOletx), "DependentTransaction.Complete" ); } }
public void Complete() { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; if (etwLog.IsEnabled()) { etwLog.MethodEnter(TraceSourceType.TraceSourceOleTx, this, $"{nameof(DependentTransaction)}.{nameof(Complete)}"); } Debug.Assert(Disposed == 0, "OletxTransction object is disposed"); int localCompleted = Interlocked.Exchange(ref _completed, 1); if (localCompleted == 1) { throw TransactionException.CreateTransactionCompletedException(DistributedTxId); } if (etwLog.IsEnabled()) { etwLog.TransactionDependentCloneComplete(TraceSourceType.TraceSourceOleTx, TransactionTraceId, "DependentTransaction"); } _volatileEnlistmentContainer.DependentCloneCompleted(); if (etwLog.IsEnabled()) { etwLog.MethodExit(TraceSourceType.TraceSourceOleTx, this, $"{nameof(DependentTransaction)}.{nameof(Complete)}"); } }
public void Complete() { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; if (etwLog.IsEnabled()) { etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this); } lock (_internalTransaction) { if (Disposed) { throw new ObjectDisposedException(nameof(DependentTransaction)); } if (_complete) { throw TransactionException.CreateTransactionCompletedException(DistributedTxId); } _complete = true; if (_blocking) { _internalTransaction.State.CompleteBlockingClone(_internalTransaction); } else { _internalTransaction.State.CompleteAbortingClone(_internalTransaction); } } if (etwLog.IsEnabled()) { etwLog.TransactionDependentCloneComplete(this, "DependentTransaction"); etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this); } }
public void Complete() { if (DiagnosticTrace.Verbose) { MethodEnteredTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), "DependentTransaction.Complete"); } int num = Interlocked.CompareExchange(ref this.completed, 1, 0); if (1 == num) { throw TransactionException.CreateTransactionCompletedException(System.Transactions.SR.GetString("TraceSourceOletx")); } if (DiagnosticTrace.Information) { DependentCloneCompleteTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), base.TransactionTraceId); } this.volatileEnlistmentContainer.DependentCloneCompleted(); if (DiagnosticTrace.Verbose) { MethodExitedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), "DependentTransaction.Complete"); } }