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);
}
}