C# Класс Castle.ActiveRecord.Scopes.TransactionScope

Implementation of ISessionScope to provide transaction semantics
Наследование: SessionScope
Показать файл Открыть проект Примеры использования класса

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

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

This is called when a session has a failure

Flush ( ) : void
GetSession ( object key ) : ISession
IsKeyKnown ( object key ) : bool

This method is invoked when the ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. RegisterSession

RegisterSession ( object key, ISession session ) : void
TransactionScope ( TransactionMode mode = TransactionMode.New, IsolationLevel isolation = IsolationLevel.Unspecified, OnDispose ondispose = OnDispose.Commit, ISessionScope parent = null, ISessionFactoryHolder holder = null, IThreadScopeInfo scopeinfo = null ) : System

Initializes a new instance of the TransactionScope class.

VoteCommit ( ) : void

Votes to commit the transaction

VoteRollBack ( ) : void

Votes to roll back the transaction

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

Метод Описание
RaiseOnCompleted ( ) : void

Raises the on completed event

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

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

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

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

This is called when a session has a failure
public FailScope ( ) : void
Результат void

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

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

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

public GetSession ( object key ) : ISession
key object
Результат ISession

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

This method is invoked when the ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. RegisterSession
public IsKeyKnown ( object key ) : bool
key object an object instance
Результат bool

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

public RegisterSession ( object key, ISession session ) : void
key object
session ISession
Результат void

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

Initializes a new instance of the TransactionScope class.
public TransactionScope ( TransactionMode mode = TransactionMode.New, IsolationLevel isolation = IsolationLevel.Unspecified, OnDispose ondispose = OnDispose.Commit, ISessionScope parent = null, ISessionFactoryHolder holder = null, IThreadScopeInfo scopeinfo = null ) : System
mode TransactionMode
isolation IsolationLevel
ondispose OnDispose
parent ISessionScope
holder ISessionFactoryHolder
scopeinfo IThreadScopeInfo
Результат System

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

Votes to commit the transaction
public VoteCommit ( ) : void
Результат void

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

Votes to roll back the transaction
public VoteRollBack ( ) : void
Результат void