C# Class Castle.Facilities.NHibernateIntegration.Internal.SessionFactoryResolver

Default implementation of ISessionFactoryResolver that always queries the kernel instance for the session factory instance.

This gives a chance to developers replace the session factory instance during the application lifetime.

Inspired on Cuyahoga project
Inheritance: ISessionFactoryResolver
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
GetSessionFactory ( String alias ) : ISessionFactory

Returns a session factory instance associated with the specified alias.

RegisterAliasComponentIdMapping ( String alias, String componentKey ) : void

Associated the alias with the component key

SessionFactoryResolver ( IKernel kernel ) : System

Constructs a SessionFactoryResolver

Method Details

GetSessionFactory() public method

Returns a session factory instance associated with the specified alias.
/// If the alias is not associated with a session factory ///
public GetSessionFactory ( String alias ) : ISessionFactory
alias String /// The alias associated with the session /// factory on the configuration node ///
return ISessionFactory

RegisterAliasComponentIdMapping() public method

Associated the alias with the component key
public RegisterAliasComponentIdMapping ( String alias, String componentKey ) : void
alias String /// The alias associated with the session /// factory on the configuration node ///
componentKey String /// The component key associated with /// the session factory on the kernel ///
return void

SessionFactoryResolver() public method

Constructs a SessionFactoryResolver
public SessionFactoryResolver ( IKernel kernel ) : System
kernel IKernel /// Kernel instance supplied by the container itself ///
return System