C# Класс com.Sconit.Persistence.SconitAdoTransaction

Wraps an ADO.NET IDbTransaction to implement the ITransaction interface.
Наследование: ITransaction
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
trans IDbTransaction

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

Метод Описание
Begin ( ) : void
Begin ( IsolationLevel isolationLevel ) : void

Begins the IDbTransaction on the IDbConnection used by the ISession.

Commit ( ) : void

Commits the ITransaction by flushing the ISession and committing the IDbTransaction.

Dispose ( ) : void

Takes care of freeing the managed and unmanaged resources that this class is responsible for.

Enlist ( IDbCommand command ) : void

Enlist the IDbCommand in the current ITransaction.

This takes care of making sure the IDbCommand's Transaction property contains the correct IDbTransaction or if there is no Transaction for the ISession - ie BeginTransaction() not called.

This method may be called even when the transaction is disposed.

Rollback ( ) : void

Rolls back the ITransaction by calling the method Rollback on the underlying IDbTransaction.

SconitAdoTransaction ( ISessionImplementor session ) : System

Initializes a new instance of the AdoTransaction class.

Защищенные методы

Метод Описание
Dispose ( bool isDisposing ) : void

Takes care of freeing the managed and unmanaged resources that this class is responsible for.

If this AdoTransaction is being Finalized (isDisposing==false) then make sure not to call any methods that could potentially bring this AdoTransaction back to life.

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

Метод Описание
AfterTransactionCompletion ( bool successful ) : void
CheckBegun ( ) : void
CheckNotDisposed ( ) : void

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

Begin() публичный Метод

public Begin ( ) : void
Результат void

Begin() публичный Метод

Begins the IDbTransaction on the IDbConnection used by the ISession.
/// Thrown if there is any problems encountered while trying to create /// the . ///
public Begin ( IsolationLevel isolationLevel ) : void
isolationLevel IsolationLevel
Результат void

Commit() публичный Метод

Commits the ITransaction by flushing the ISession and committing the IDbTransaction.
/// Thrown if there is any exception while trying to call Commit() on /// the underlying . ///
public Commit ( ) : void
Результат void

Dispose() публичный Метод

Takes care of freeing the managed and unmanaged resources that this class is responsible for.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Takes care of freeing the managed and unmanaged resources that this class is responsible for.
If this AdoTransaction is being Finalized (isDisposing==false) then make sure not to call any methods that could potentially bring this AdoTransaction back to life.
protected Dispose ( bool isDisposing ) : void
isDisposing bool Indicates if this AdoTransaction is being Disposed of or Finalized.
Результат void

Enlist() публичный Метод

Enlist the IDbCommand in the current ITransaction.

This takes care of making sure the IDbCommand's Transaction property contains the correct IDbTransaction or if there is no Transaction for the ISession - ie BeginTransaction() not called.

This method may be called even when the transaction is disposed.

public Enlist ( IDbCommand command ) : void
command IDbCommand The to enlist in this Transaction.
Результат void

Rollback() публичный Метод

Rolls back the ITransaction by calling the method Rollback on the underlying IDbTransaction.
/// Thrown if there is any exception while trying to call Rollback() on /// the underlying . ///
public Rollback ( ) : void
Результат void

SconitAdoTransaction() публичный Метод

Initializes a new instance of the AdoTransaction class.
public SconitAdoTransaction ( ISessionImplementor session ) : System
session ISessionImplementor The the Transaction is for.
Результат System

Описание свойств

trans публичное свойство

public IDbTransaction trans
Результат IDbTransaction