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.PromoterTypeDtcGuid.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.

适用于