Transaction.SetDistributedTransactionIdentifier Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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.