internal static Exception CreateTransactionCompletedException(Guid distributedTxId)
{
string messagewithTxId = SR.TransactionAlreadyCompleted;
if (IncludeDistributedTxId(distributedTxId))
messagewithTxId = string.Format(SR.DistributedTxIDInTransactionException, messagewithTxId, distributedTxId);
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.TransactionExceptionTrace(TransactionExceptionType.InvalidOperationException, messagewithTxId, string.Empty);
}
return new InvalidOperationException(messagewithTxId);
}