C# Class Castle.ActiveRecord.Scopes.TransactionScope

Implementation of ISessionScope to provide transaction semantics
Inheritance: SessionScope
ファイルを表示 Open project: shosca/ActiveRecord Class Usage Examples

Public Methods

Method 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

Method Description
RaiseOnCompleted ( ) : void

Raises the on completed event

Method Details

Dispose() public method

public Dispose ( ) : void
return void

FailScope() public method

This is called when a session has a failure
public FailScope ( ) : void
return void

Flush() public method

public Flush ( ) : void
return void

GetSession() public method

public GetSession ( object key ) : ISession
key object
return ISession

IsKeyKnown() public method

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
return bool

RegisterSession() public method

public RegisterSession ( object key, ISession session ) : void
key object
session ISession
return void

TransactionScope() public method

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
return System

VoteCommit() public method

Votes to commit the transaction
public VoteCommit ( ) : void
return void

VoteRollBack() public method

Votes to roll back the transaction
public VoteRollBack ( ) : void
return void