TransactionEventArgs 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为下面的事务事件提供数据:DistributedTransactionStarted、TransactionCompleted。
public ref class TransactionEventArgs : EventArgspublic class TransactionEventArgs : EventArgstype TransactionEventArgs = class
    inherit EventArgsPublic 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) |