共用方式為


Transaction.PromoteAndEnlistDurable 方法

定義

提升和登記支援兩階段交易認可 (Two-Phase Commit) 的長期資源管理員以參與異動。

public:
 System::Transactions::Enlistment ^ PromoteAndEnlistDurable(Guid resourceManagerIdentifier, System::Transactions::IPromotableSinglePhaseNotification ^ promotableNotification, System::Transactions::ISinglePhaseNotification ^ enlistmentNotification, System::Transactions::EnlistmentOptions enlistmentOptions);
public System.Transactions.Enlistment PromoteAndEnlistDurable (Guid resourceManagerIdentifier, System.Transactions.IPromotableSinglePhaseNotification promotableNotification, System.Transactions.ISinglePhaseNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions);
member this.PromoteAndEnlistDurable : Guid * System.Transactions.IPromotableSinglePhaseNotification * System.Transactions.ISinglePhaseNotification * System.Transactions.EnlistmentOptions -> System.Transactions.Enlistment
Public Function PromoteAndEnlistDurable (resourceManagerIdentifier As Guid, promotableNotification As IPromotableSinglePhaseNotification, enlistmentNotification As ISinglePhaseNotification, enlistmentOptions As EnlistmentOptions) As Enlistment

參數

resourceManagerIdentifier
Guid

資源管理員的唯一識別項,其應該在整個資源管理員失敗或重新開機期間持續。

promotableNotification
IPromotableSinglePhaseNotification

物件,該物件用來當做資源管理員內部之非分散式異動的認可委派。

enlistmentNotification
ISinglePhaseNotification

實作 IEnlistmentNotification 介面以接收兩階段交易認可告知的物件。

enlistmentOptions
EnlistmentOptions

如果資源管理員想要在準備階段執行額外的工作,即為 EnlistDuringPrepareRequired

傳回

適用於