C# Class Castle.ActiveRecord.Scopes.TransactionScope

Implementation of ISessionScope to provide transaction semantics
Inheritance: SessionScope
Afficher le fichier Open project: shosca/ActiveRecord Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
RaiseOnCompleted ( ) : void

Raises the on completed event

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FailScope() public méthode

This is called when a session has a failure
public FailScope ( ) : void
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

GetSession() public méthode

public GetSession ( object key ) : ISession
key object
Résultat ISession

IsKeyKnown() public méthode

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
Résultat bool

RegisterSession() public méthode

public RegisterSession ( object key, ISession session ) : void
key object
session ISession
Résultat void

TransactionScope() public méthode

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
Résultat System

VoteCommit() public méthode

Votes to commit the transaction
public VoteCommit ( ) : void
Résultat void

VoteRollBack() public méthode

Votes to roll back the transaction
public VoteRollBack ( ) : void
Résultat void