public IAsyncResult BeginCommit(AsyncCallback asyncCallback, object asyncState)
{
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this);
etwLog.TransactionCommit(this, "CommittableTransaction");
}
if (Disposed)
{
throw new ObjectDisposedException(nameof(CommittableTransaction));
}
lock (_internalTransaction)
{
if (_complete)
{
throw TransactionException.CreateTransactionCompletedException(DistributedTxId);
}
// this.complete will get set to true when the transaction enters a state that is
// beyond Phase0.
_internalTransaction.State.BeginCommit(_internalTransaction, true, asyncCallback, asyncState);
}
if (etwLog.IsEnabled())
{
etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this);
}
return this;
}