C# Class Castle.ActiveRecord.SessionFactoryHolder

Default implementation of ISessionFactoryHolder
This class is thread safe
Inheritance: System.MarshalByRefObject, ISessionFactoryHolder
Show file Open project: shosca/ActiveRecord

Protected Properties

Property Type Description
RegisteredAssemblies ISet
Type2Model Model>.ConcurrentDictionary
Type2SessFactory SfHolder>.IDictionary

Public Methods

Method Description
Dispose ( ) : void
GetAllConfigurations ( ) : NHibernate.Cfg.Configuration[]

Pendent

GetClassMetadata ( Type type ) : IClassMetadata
GetConfiguration ( Type type ) : NHibernate.Cfg.Configuration

Requests the Configuration associated to the type.

GetModel ( Type type ) : Model
GetNonProxyType ( Type type ) : Type
GetRegisteredTypes ( ) : System.Type[]

Requests the registered types

GetSessionFactories ( ) : ISessionFactory[]

Gets the all the session factories.

GetSessionFactory ( Type type ) : ISessionFactory

Returns ISessionFactory of a registered type

IsInitialized ( Type type ) : bool
RegisterConfiguration ( NHibernate.Cfg.Configuration cfg, string name ) : void

This method allows direct registration of Configuration

SessionFactoryHolder ( IActiveRecordConfiguration source ) : System

Protected Methods

Method Description
RegisterConfiguration ( SessionFactoryConfig config ) : void

Private Methods

Method Description
CreateThreadScopeInfoImplementation ( IActiveRecordConfiguration source ) : IThreadScopeInfo

Method Details

Dispose() public method

public Dispose ( ) : void
return void

GetAllConfigurations() public method

Pendent
public GetAllConfigurations ( ) : NHibernate.Cfg.Configuration[]
return NHibernate.Cfg.Configuration[]

GetClassMetadata() public method

public GetClassMetadata ( Type type ) : IClassMetadata
type System.Type
return IClassMetadata

GetConfiguration() public method

Requests the Configuration associated to the type.
public GetConfiguration ( Type type ) : NHibernate.Cfg.Configuration
type System.Type
return NHibernate.Cfg.Configuration

GetModel() public method

public GetModel ( Type type ) : Model
type System.Type
return Model

GetNonProxyType() public method

public GetNonProxyType ( Type type ) : Type
type System.Type
return System.Type

GetRegisteredTypes() public method

Requests the registered types
public GetRegisteredTypes ( ) : System.Type[]
return System.Type[]

GetSessionFactories() public method

Gets the all the session factories.
public GetSessionFactories ( ) : ISessionFactory[]
return ISessionFactory[]

GetSessionFactory() public method

Returns ISessionFactory of a registered type
public GetSessionFactory ( Type type ) : ISessionFactory
type System.Type
return ISessionFactory

IsInitialized() public method

public IsInitialized ( Type type ) : bool
type System.Type
return bool

RegisterConfiguration() public method

This method allows direct registration of Configuration
public RegisterConfiguration ( NHibernate.Cfg.Configuration cfg, string name ) : void
cfg NHibernate.Cfg.Configuration
name string
return void

RegisterConfiguration() protected method

protected RegisterConfiguration ( SessionFactoryConfig config ) : void
config Castle.ActiveRecord.Config.SessionFactoryConfig
return void

SessionFactoryHolder() public method

public SessionFactoryHolder ( IActiveRecordConfiguration source ) : System
source IActiveRecordConfiguration
return System

Property Details

RegisteredAssemblies protected property

protected ISet RegisteredAssemblies
return ISet

Type2Model protected property

protected ConcurrentDictionary Type2Model
return Model>.ConcurrentDictionary

Type2SessFactory protected property

protected IDictionary Type2SessFactory
return SfHolder>.IDictionary