C# Class Castle.Facilities.NHibernateIntegration.Builders.DefaultConfigurationBuilder

Default imlementation of IConfigurationBuilder
Inheritance: IConfigurationBuilder
Exibir arquivo Open project: hconceicao/Castle.Facilities.NHibernateIntegration3 Class Usage Examples

Public Methods

Method Description
GetConfiguration ( IConfiguration config ) : NHibernate.Cfg.Configuration

Builds the Configuration object from the specifed configuration

Protected Methods

Method Description
ApplyConfigurationSettings ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void

Applies the configuration settings.

GenerateMappingFromAttributesIfNeeded ( NHibernate.Cfg.Configuration cfg, String targetAssembly ) : void

If targetAssembly has a reference on NHibernate.Mapping.Attributes : use the NHibernate mapping attributes contained in that assembly to update NHibernate configuration (cfg). Else do nothing

To avoid an unnecessary dependency on the library NHibernate.Mapping.Attributes.dll when using this facility without NHibernate mapping attributes, all calls to that library are made using reflexion.

RegisterAssemblies ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void

Registers the assemblies.

RegisterListeners ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void

Registers the listeners.

RegisterResources ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void

Registers the resources.

Private Methods

Method Description
ObtainAssembly ( String assembly ) : Assembly

Method Details

ApplyConfigurationSettings() protected method

Applies the configuration settings.
protected ApplyConfigurationSettings ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void
cfg NHibernate.Cfg.Configuration The CFG.
facilityConfig IConfiguration The facility config.
return void

GenerateMappingFromAttributesIfNeeded() protected method

If targetAssembly has a reference on NHibernate.Mapping.Attributes : use the NHibernate mapping attributes contained in that assembly to update NHibernate configuration (cfg). Else do nothing
To avoid an unnecessary dependency on the library NHibernate.Mapping.Attributes.dll when using this facility without NHibernate mapping attributes, all calls to that library are made using reflexion.
protected GenerateMappingFromAttributesIfNeeded ( NHibernate.Cfg.Configuration cfg, String targetAssembly ) : void
cfg NHibernate.Cfg.Configuration NHibernate configuration
targetAssembly String Target assembly name
return void

GetConfiguration() public method

Builds the Configuration object from the specifed configuration
public GetConfiguration ( IConfiguration config ) : NHibernate.Cfg.Configuration
config IConfiguration
return NHibernate.Cfg.Configuration

RegisterAssemblies() protected method

Registers the assemblies.
protected RegisterAssemblies ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void
cfg NHibernate.Cfg.Configuration The CFG.
facilityConfig IConfiguration The facility config.
return void

RegisterListeners() protected method

Registers the listeners.
protected RegisterListeners ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void
cfg NHibernate.Cfg.Configuration The CFG.
facilityConfig IConfiguration The facility config.
return void

RegisterResources() protected method

Registers the resources.
protected RegisterResources ( NHibernate.Cfg.Configuration cfg, IConfiguration facilityConfig ) : void
cfg NHibernate.Cfg.Configuration The CFG.
facilityConfig IConfiguration The facility config.
return void