public void EndCommit(IAsyncResult asyncResult)
{
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this);
}
if (asyncResult != ((object)this))
{
throw new ArgumentException(SR.BadAsyncResult, nameof(asyncResult));
}
lock (_internalTransaction)
{
do
{
if (_internalTransaction.State.IsCompleted(_internalTransaction))
{
break;
}
} while (Monitor.Wait(_internalTransaction));
_internalTransaction.State.EndCommit(_internalTransaction);
}
if (etwLog.IsEnabled())
{
etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this);
}
}