C# Class Cronos.Infrastructure.NHibernate.LazySessionContext

Inheritance: ICurrentSessionContext
Mostrar archivo Open project: mravinale/simple-cqrs Class Usage Examples

Public Methods

Method Description
Bind ( ISessionFactory sessionFactory ) : void
Bind ( Lazy sessionInitializer, ISessionFactory sessionFactory ) : void

Bind a new sessionInitializer to the context of the sessionFactory.

CurrentSession ( ) : ISession

Retrieve the current session for the session factory.

LazySessionContext ( ISessionFactoryImplementor factory ) : System
UnBind ( ISessionFactory sessionFactory ) : ISession

Unbind the current session of the session factory.

Private Methods

Method Description
BeginSession ( ISessionFactory sf ) : ISession
GetCurrentFactoryMap ( ) : Lazy>.IDictionary

Provides the CurrentMap of SessionFactories. If there is no map create/store and return a new one.

Method Details

Bind() public static method

public static Bind ( ISessionFactory sessionFactory ) : void
sessionFactory ISessionFactory
return void

Bind() public static method

Bind a new sessionInitializer to the context of the sessionFactory.
public static Bind ( Lazy sessionInitializer, ISessionFactory sessionFactory ) : void
sessionInitializer Lazy
sessionFactory ISessionFactory
return void

CurrentSession() public method

Retrieve the current session for the session factory.
public CurrentSession ( ) : ISession
return ISession

LazySessionContext() public method

public LazySessionContext ( ISessionFactoryImplementor factory ) : System
factory ISessionFactoryImplementor
return System

UnBind() public static method

Unbind the current session of the session factory.
public static UnBind ( ISessionFactory sessionFactory ) : ISession
sessionFactory ISessionFactory
return ISession