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