語言

TransactionEventArgs 類別

定義

提供以下交易事件的資料: DistributedTransactionStarted, TransactionCompleted。

public ref class TransactionEventArgs : EventArgs
public class TransactionEventArgs : EventArgs
type TransactionEventArgs = class
    inherit EventArgs
Public Class TransactionEventArgs
Inherits EventArgs
繼承
TransactionEventArgs

範例

以下範例展示了這種類型如何被使用。

//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);
}

建構函式

名稱 Description
TransactionEventArgs()

初始化 TransactionEventArgs 類別的新執行個體。

屬性

名稱 Description
Transaction

取得提供事件狀態的交易。

方法

名稱 Description
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於