internal virtual bool PromoteDurable(InternalTransaction tx)
{
// Promote the durable enlistment if one exists.
if (tx._durableEnlistment != null)
{
// Directly enlist the durable enlistment with the resource manager.
InternalEnlistment enlistment = tx._durableEnlistment;
IPromotedEnlistment promotedEnlistment = tx.PromotedTransaction.EnlistDurable(
enlistment.ResourceManagerIdentifier,
(DurableInternalEnlistment)enlistment,
enlistment.SinglePhaseNotification != null,
EnlistmentOptions.None
);
// Promote the enlistment.
tx._durableEnlistment.State.ChangeStatePromoted(tx._durableEnlistment, promotedEnlistment);
}
return true;
}