C# Class Castle.Facilities.NHibernate.SessionManager

The session manager is an object wrapper around the "real" manager which is managed by a custom per-transaction lifestyle. If you wish to implement your own manager, you can pass a function to this object at construction time and replace the built-in session manager.
Inheritance: ISessionManager
显示文件 Open project: haf/Castle.Facilities.NHibernate

Public Methods

Method Description
SessionManager ( Func getSession, ITransactionManager transactionManager ) : System

Constructor.

Private Methods

Method Description
ClearStoredSession ( ) : void

Removes the session stored in the callcontext

GetStoredSession ( ) : ISession

Retrieves the session stored in the callcontext

ISessionManager ( ) : ISession
Inner_TransactionCompleted ( object sender, System e ) : void

Clear the CallContext when the transaction ends

ObtainCurrentTransaction ( ) : Maybe

Gets the current transaction from de AutoTx facility via an ITransactionManager

StoreSession ( ISession session ) : void

Stores a session in the CallContext

Method Details

SessionManager() public method

Constructor.
public SessionManager ( Func getSession, ITransactionManager transactionManager ) : System
getSession Func
transactionManager ITransactionManager
return System