public void SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification promotableNotification,
Guid distributedTransactionIdentifier)
{
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this);
}
if (Disposed)
{
throw new ObjectDisposedException(nameof(Transaction));
}
if (promotableNotification == null)
{
throw new ArgumentNullException(nameof(promotableNotification));
}
if (distributedTransactionIdentifier == Guid.Empty)
{
throw new ArgumentException(null, nameof(distributedTransactionIdentifier));
}
if (_complete)
{
throw TransactionException.CreateTransactionCompletedException(DistributedTxId);
}
lock (_internalTransaction)
{
_internalTransaction.State.SetDistributedTransactionId(_internalTransaction,
promotableNotification,
distributedTransactionIdentifier);
if (etwLog.IsEnabled())
{
etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this);
}
return;
}
}