Transaction.SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification, Guid) Method

Definition

Define o identificador da transação distribuída gerado pelo promotor não MSDTC.Sets the distributed transaction identifier generated by the non-MSDTC promoter.

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)

Parameters

promotableNotification
IPromotableSinglePhaseNotification

Uma interface IPromotableSinglePhaseNotification implementada pelo participante.A IPromotableSinglePhaseNotification interface implemented by the participant.

distributedTransactionIdentifier
Guid

O identificador da transação usado pelo gerenciador de transação distribuídas.The identifier for the transaction used by the distributed transaction manager.

Remarks

Esse método só pode ser chamado com êxito enquanto o método IPromotableSinglePhaseNotification.Promote está sendo processado.This method can only be called successfully while the IPromotableSinglePhaseNotification.Promote method is being processed. Se esse método for chamado em qualquer outro momento, um TransactionException será lançado.If this method is called at any other time, a TransactionException is thrown.

O valor especificado do parâmetro promotableNotification deve ser o mesmo objeto que foi originalmente especificado para a invocação Transaction.EnlistPromotableSinglePhase.The specified value of the promotableNotification parameter must be the same object that was originally specified to the Transaction.EnlistPromotableSinglePhase invocation. Se esse não for o caso, um InvalidOperationException será lançado.If this is not the case, then an InvalidOperationException is thrown.

Applies to