C# Class Summer.Batch.Common.Transaction.TransactionScopeManager

Utility class for managing transaction scopes.
Afficher le fichier Open project: SummerBatch/SummerBatch

Méthodes publiques

Méthode Description
CreateScope ( TransactionScopeOption scopeOption = TransactionScopeOption.Required, IsolationLevel isolationLevel = IsolationLevel.ReadCommitted, System.TimeSpan timeout = null ) : TransactionScope

Creates a new transaction scope with the given options and registers the ITransactionSynchronization and IEnlistmentNotification with the current transaction.

RegisterResource ( IEnlistmentNotification resource ) : void

Registers a new IEnlistmentNotification.

RegisterTransactionSynchronization ( TransactionScope scope, ITransactionSynchronization synchronization ) : void

Registers a new ITransactionSynchronization to a scope.

UnregisterResource ( IEnlistmentNotification resource ) : void

Unregisters a new IEnlistmentNotification.

Private Methods

Méthode Description
GetIsolationLevel ( IsolationLevel defaultIsolationLevel ) : IsolationLevel
GetTransactionCompleted ( TransactionScope scope ) : TransactionCompletedEventHandler
LogTransactionIfAborted ( TransactionEventArgs args ) : void

Method Details

CreateScope() public static méthode

Creates a new transaction scope with the given options and registers the ITransactionSynchronization and IEnlistmentNotification with the current transaction.
public static CreateScope ( TransactionScopeOption scopeOption = TransactionScopeOption.Required, IsolationLevel isolationLevel = IsolationLevel.ReadCommitted, System.TimeSpan timeout = null ) : TransactionScope
scopeOption TransactionScopeOption The scope options to use, by default.
isolationLevel IsolationLevel The isolation level, by default.
timeout System.TimeSpan The transaction timeout, by default.
Résultat System.Transactions.TransactionScope

RegisterResource() public static méthode

Registers a new IEnlistmentNotification.
public static RegisterResource ( IEnlistmentNotification resource ) : void
resource IEnlistmentNotification the resource to register
Résultat void

RegisterTransactionSynchronization() public static méthode

Registers a new ITransactionSynchronization to a scope.
public static RegisterTransactionSynchronization ( TransactionScope scope, ITransactionSynchronization synchronization ) : void
scope System.Transactions.TransactionScope the scope to register the synchronization to
synchronization ITransactionSynchronization the synchronization to register
Résultat void

UnregisterResource() public static méthode

Unregisters a new IEnlistmentNotification.
public static UnregisterResource ( IEnlistmentNotification resource ) : void
resource IEnlistmentNotification the resource to unregister
Résultat void