TransactionEventArgs Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides data for the following transaction events: DistributedTransactionStarted, TransactionCompleted.
public ref class TransactionEventArgs : EventArgs
public class TransactionEventArgs : EventArgs
type TransactionEventArgs = class
inherit EventArgs
Public Class TransactionEventArgs
Inherits EventArgs
- Inheritance
Examples
The following example demonstrates how this type is used.
//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);
}
Constructors
TransactionEventArgs() |
Initializes a new instance of the TransactionEventArgs class. |
Properties
Transaction |
Gets the transaction for which event status is provided. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |