Transaction.EnlistPromotableSinglePhase 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用可提升的單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。
EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) |
使用可提升的單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。 |
EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) |
使用可提升的單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。 |
使用可提升的單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。
public:
bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ promotableSinglePhaseNotification);
public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification -> bool
Public Function EnlistPromotableSinglePhase (promotableSinglePhaseNotification As IPromotableSinglePhaseNotification) As Boolean
參數
- promotableSinglePhaseNotification
- IPromotableSinglePhaseNotification
參與者所實作 IPromotableSinglePhaseNotification 介面。
傳回
描述登記的 SinglePhaseEnlistment 介面實作。
備註
交易中的登記是不穩定的;也就是說,他們不會在參與者的失敗中倖存下來。 此外,此方法只會建議交易管理員呈報控制權,但無法保證擴大本身。 如果呈報失敗,則不會通知用戶並回復交易。
參數 promotableSinglePhaseNotification
用來與交易管理員通訊嘗試認可資源管理員內部交易的結果。 如果報告不一致的數據,交易管理員會擲回例外狀況。 如果回報 InDoubt 結果,交易管理員會在自己的內部登記中尋找結果通知,並忽略回報的回應。
如需有關登記和交易呈報的詳細資訊,請參閱 交易管理擴大。 如需 PSPE 的詳細資訊,請參閱使用單一階段認可和可提升的單一階段通知 優化。
適用於
.NET 10 及其他版本
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
使用可提升的單一階段登記 (PSPE) 來登記具有內部交易的資源管理員。
public:
bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ promotableSinglePhaseNotification, Guid promoterType);
public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification * Guid -> bool
Public Function EnlistPromotableSinglePhase (promotableSinglePhaseNotification As IPromotableSinglePhaseNotification, promoterType As Guid) As Boolean
參數
- promotableSinglePhaseNotification
- IPromotableSinglePhaseNotification
參與者所實作 IPromotableSinglePhaseNotification 介面。
- promoterType
- Guid
分散式交易處理器的類型。
傳回
描述登記的 SinglePhaseEnlistment 介面實作。
備註
如果為
如果為 promoterType
參數指定的值 不是TransactionInterop.PromoterTypeDTC
,則不會由 MSDTC 升級交易,而是由呼叫端的 IPromotableSinglePhaseNotification
實作來升級。 如果此呼叫成功,則交易上有一組後續作業會傳回 TransactionPromotionException
。 這些工作包括:
Transaction.EnlistDurable
TransactionInterop.GetDtcTransaction
TransactionInterop.GetExportCookie
TransactionInterop.GetTransmitterPropagationToken
Transaction 物件的串行化
適用於
.NET 10 及其他版本
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |