Transaction.GetPromotedToken 方法


获取提升事务时由 Promote 方法返回的 byte []Gets the byte[] returned by the Promote method when the transaction is promoted.

 cli::array <System::Byte> ^ GetPromotedToken();
public byte[] GetPromotedToken ();
member this.GetPromotedToken : unit -> byte[]
Public Function GetPromotedToken () As 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.PromoterType属性的值定义。The format of the returned byte[] is defined by the value of the Transaction.PromoterType property. 如果Transaction.PromoterType属性的值为TransactionInterop.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. 为了解释此后一种情况下已升级的标记,您将需要查阅执行EnlistPromotableSinglePhase调用的代码的文档。In 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.