C# Class Castle.Facilities.NHibernateIntegration.Persisters.DefaultConfigurationPersister

Knows how to read/write an NH Configuration from a given filename, and whether that file should be trusted or a new Configuration should be built.
Inheritance: IConfigurationPersister
Exibir arquivo Open project: hconceicao/Castle.Facilities.NHibernateIntegration3

Public Methods

Method Description
IsNewConfigurationRequired ( string filename, IList dependencies ) : bool

Checks if a new Configuration is required or a serialized one should be used.

ReadConfiguration ( string filename ) : NHibernate.Cfg.Configuration

Gets the Configuration from the file.

WriteConfiguration ( string filename, NHibernate.Cfg.Configuration cfg ) : void

Writes the Configuration to the file

Method Details

IsNewConfigurationRequired() public method

Checks if a new Configuration is required or a serialized one should be used.
public IsNewConfigurationRequired ( string filename, IList dependencies ) : bool
filename string Name of the file containing the NH configuration
dependencies IList Files that the serialized configuration depends on.
return bool

ReadConfiguration() public method

Gets the Configuration from the file.
public ReadConfiguration ( string filename ) : NHibernate.Cfg.Configuration
filename string The name of the file to read from
return NHibernate.Cfg.Configuration

WriteConfiguration() public method

Writes the Configuration to the file
public WriteConfiguration ( string filename, NHibernate.Cfg.Configuration cfg ) : void
filename string The name of the file to write to
cfg NHibernate.Cfg.Configuration The NH Configuration
return void