語言

Transaction.PromoteAndEnlistDurable 方法

定義

推廣並啟用一個持久資源管理器,支援兩階段承諾參與交易。

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 如果資源管理員想在準備階段執行額外工作,

傳回

適用於