TransactionEventArgs 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供以下事务事件的数据: DistributedTransactionStarted。 TransactionCompleted
public ref class TransactionEventArgs : EventArgs
public class TransactionEventArgs : EventArgs
type TransactionEventArgs = class
inherit EventArgs
Public Class TransactionEventArgs
Inherits EventArgs
- 继承
示例
以下示例演示了如何使用此类型。
//Transaction completed event handler
static void Current_TransactionCompleted(object sender, TransactionEventArgs e)
{
Console.WriteLine("A transaction has completed:");
Console.WriteLine("ID:{0}", e.Transaction.TransactionInformation.LocalIdentifier);
Console.WriteLine("Distributed ID: {0}", e.Transaction.TransactionInformation.DistributedIdentifier);
Console.WriteLine("Status: {0}", e.Transaction.TransactionInformation.Status);
Console.WriteLine("IsolationLevel: {0}", e.Transaction.IsolationLevel);
}
构造函数
| 名称 | 说明 |
|---|---|
| TransactionEventArgs() |
初始化 TransactionEventArgs 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| Transaction |
获取为其提供事件状态的事务。 |
方法
| 名称 | 说明 |
|---|---|
| Equals(Object) |
确定指定的对象是否等于当前对象。 (继承自 Object) |
| GetHashCode() |
用作默认哈希函数。 (继承自 Object) |
| GetType() |
获取当前实例的 Type。 (继承自 Object) |
| MemberwiseClone() |
创建当前 Object的浅表副本。 (继承自 Object) |
| ToString() |
返回一个表示当前对象的字符串。 (继承自 Object) |