Transaction.SetDistributedTransactionIdentifier Méthode

Définition

Définit l’identificateur de transaction distribué généré par le promoteur non 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)

Paramètres

promotableNotification
IPromotableSinglePhaseNotification

Interface IPromotableSinglePhaseNotification implémentée par le participant.

distributedTransactionIdentifier
Guid

Identificateur de la transaction utilisée par le gestionnaire de transactions distribué.

Remarques

Cette méthode ne peut être appelée qu’avec succès pendant le traitement de la IPromotableSinglePhaseNotification.Promote méthode. Si cette méthode est appelée à tout autre moment, une TransactionException méthode est levée.

La valeur spécifiée du promotableNotification paramètre doit être le même objet que celui spécifié à l’origine pour l’appel Transaction.EnlistPromotableSinglePhase . Si ce n’est pas le cas, une InvalidOperationException exception est levée.

S’applique à