Język

Transaction.SetDistributedTransactionIdentifier Metoda

Definicja

Ustawia identyfikator transakcji rozproszonej generowany przez promotora innego niż MSDTC.

public:
 void SetDistributedTransactionIdentifier(System::Transactions::IPromotableSinglePhaseNotification ^ promotableNotification, Guid distributedTransactionIdentifier);
public void SetDistributedTransactionIdentifier(System.Transactions.IPromotableSinglePhaseNotification promotableNotification, Guid distributedTransactionIdentifier);
member this.SetDistributedTransactionIdentifier : System.Transactions.IPromotableSinglePhaseNotification * Guid -> unit
Public Sub SetDistributedTransactionIdentifier (promotableNotification As IPromotableSinglePhaseNotification, distributedTransactionIdentifier As Guid)

Parametry

promotableNotification
IPromotableSinglePhaseNotification

IPromotableSinglePhaseNotification Interfejs zaimplementowany przez uczestnika.

distributedTransactionIdentifier
Guid

Identyfikator transakcji używanej przez rozproszonego menedżera transakcji.

Uwagi

Tę metodę można wywołać tylko podczas przetwarzania IPromotableSinglePhaseNotification.Promote metody. Jeśli ta metoda jest wywoływana w dowolnym innym momencie, TransactionException jest zgłaszana wartość .

Określona wartość parametru promotableNotification musi być tym samym obiektem, który został pierwotnie określony do Transaction.EnlistPromotableSinglePhase wywołania. Jeśli tak nie jest, zostanie zgłoszony element InvalidOperationException .

Dotyczy