Transaction.GetPromotedToken 方法

定義

當此交易升級時,取得 Promote 方法傳回的 byte[]Gets the byte[] returned by the Promote method when the transaction is promoted.

public:
 cli::array <System::Byte> ^ GetPromotedToken();
public byte[] GetPromotedToken ();
member this.GetPromotedToken : unit -> byte[]
Public Function GetPromotedToken () As Byte()

傳回

Byte[]

當此交易升級時,Promote 方法傳回的 byte[]The byte[] returned by the Promote method when the transaction is promoted.

備註

如果尚未升級交易,這個方法會造成交易升級的副作用。This method has the side effect of causing promotion of the transaction if it is not already promoted.

傳回的格式 byte[] 是由屬性的值所定義 Transaction.PromoterTypeThe format of the returned byte[] is defined by the value of the Transaction.PromoterType property. 如果屬性的值 Transaction.PromoterTypeTransactionInterop.PromoterTypeDtc 或,則 Guid.Empty byte[] 這個方法所傳回的會是 MSDTC 發送器傳播權杖。If the value of the Transaction.PromoterType property is TransactionInterop.PromoterTypeDtc or Guid.Empty, then the byte[] returned by this method is an MSDTC transmitter propagation token. 屬性的任何其他值 Transaction.PromoterType 會指定由呼叫端定義的格式,該格式會 Transaction.EnlistPromotableSinglePhase 指定屬性型別值。Any other value for the Transaction.PromoterType property specifies a format that is defined by the caller of Transaction.EnlistPromotableSinglePhase that specified the property type value. 為了在第二種情況下解讀升級的權杖,您必須參閱檔,以取得進行呼叫的程式碼 EnlistPromotableSinglePhaseIn order to interpret the promoted token in this latter case, you will need to consult the documentation for the code that made the EnlistPromotableSinglePhase call.

適用於