Пример #1
0
        void IConfigurationSystem.Init() {
            lock (this) {
                if (_application == null) {
                    ConfigurationRecord machine = null;
                    
                    string machineFilename = MachineConfigurationFilePath;
                    Uri appFilename = AppConfigPath;

                    ConfigurationRecord.TraceVerbose("opening Machine config file     \"" + machineFilename + "\"");
                    _application = machine = new ConfigurationRecord();
                    bool machineFileExists = machine.Load(machineFilename);
                    
                    // only load application config if machine.config exists
                    if (machineFileExists && appFilename != null) {
                        ConfigurationRecord.TraceVerbose("opening Application config file \"" + appFilename + "\"");
                        _application = new ConfigurationRecord(machine);
                        _application.Load(appFilename.ToString());
                    }
                }
            }
        }
Пример #2
0
        void IConfigurationSystem.Init()
        {
            lock (this) {
                if (_application == null)
                {
                    ConfigurationRecord machine = null;

                    string machineFilename = MachineConfigurationFilePath;
                    Uri    appFilename     = AppConfigPath;

                    ConfigurationRecord.TraceVerbose("opening Machine config file     \"" + machineFilename + "\"");
                    _application = machine = new ConfigurationRecord();
                    bool machineFileExists = machine.Load(machineFilename);

                    // only load application config if machine.config exists
                    if (machineFileExists && appFilename != null)
                    {
                        ConfigurationRecord.TraceVerbose("opening Application config file \"" + appFilename + "\"");
                        _application = new ConfigurationRecord(machine);
                        _application.Load(appFilename.ToString());
                    }
                }
            }
        }
 public ConfigurationRecord(ConfigurationRecord parent)
 {
     _results = new Hashtable();
     _parent  = parent;
 }
Пример #4
0
 public ConfigurationRecord(ConfigurationRecord parent) {
     _results = new Hashtable();
     _parent = parent;
 }