C# Класс Summer.Batch.Common.Transaction.TransactionScopeManager

Utility class for managing transaction scopes.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetIsolationLevel ( IsolationLevel defaultIsolationLevel ) : IsolationLevel
GetTransactionCompleted ( TransactionScope scope ) : TransactionCompletedEventHandler
LogTransactionIfAborted ( TransactionEventArgs args ) : void

Описание методов

CreateScope() публичный статический Метод

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.
Результат System.Transactions.TransactionScope

RegisterResource() публичный статический Метод

Registers a new IEnlistmentNotification.
public static RegisterResource ( IEnlistmentNotification resource ) : void
resource IEnlistmentNotification the resource to register
Результат void

RegisterTransactionSynchronization() публичный статический Метод

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
Результат void

UnregisterResource() публичный статический Метод

Unregisters a new IEnlistmentNotification.
public static UnregisterResource ( IEnlistmentNotification resource ) : void
resource IEnlistmentNotification the resource to unregister
Результат void