internal override void EnterState(InternalEnlistment enlistment)
{
// Set the enlistment state
enlistment.State = this;
Monitor.Exit(enlistment.Transaction);
try
{
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.EnlistmentStatus(enlistment, NotificationCall.Rollback);
}
// Send the Rollback notification to the enlistment
if (enlistment.SinglePhaseNotification != null)
{
enlistment.SinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
}
else
{
enlistment.PromotableSinglePhaseNotification.Rollback(enlistment.SinglePhaseEnlistment);
}
}
finally
{
Monitor.Enter(enlistment.Transaction);
}
}