public DefaultConfigurationManager( IConfigurationDialogFactory factory, string configurationFile, string sectionName )
: base( configurationFile )
{
this.ConfigurationFactory = factory;
this.LogFilename = DefaultLogFileName;
if ( !String.IsNullOrEmpty( configurationFile ) )
{
// Get current configuration file.
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = configurationFile;
this.Configuration = ConfigurationManager.OpenMappedExeConfiguration( map, ConfigurationUserLevel.None );
}
else
{
this.Configuration = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None );
}
// Get the section.
this.ConfigurationSection = this.Configuration.GetSection( sectionName ) as AxiomConfigurationSection;
if ( this.ConfigurationSection != null && !String.IsNullOrEmpty( this.ConfigurationSection.LogFilename ) )
{
this.LogFilename = this.ConfigurationSection.LogFilename;
}
}