Transaction.GetPromotedToken Method

Definition

获取提升事务时由 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()

Returns

Byte[]

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

Remarks

此方法的副作用是导致事务提升(如果尚未升级)。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.

Applies to