public void Init() { lock (this) { if (config != null) { return; } ConfigurationData data = new ConfigurationData(); if (data.LoadString(GetBundledMachineConfig())) { // do nothing } else { if (!data.Load(GetMachineConfigPath())) { throw new ConfigurationException("Cannot find " + GetMachineConfigPath()); } } string appfile = GetAppConfigPath(); if (appfile == null) { config = data; return; } ConfigurationData appData = new ConfigurationData(data); if (appData.Load(appfile)) { config = appData; } else { config = data; } } }
public void Init () { lock (this) { if (config != null) return; ConfigurationData data = new ConfigurationData (); if (data.LoadString (GetBundledMachineConfig ())) { // do nothing } else { if (!data.Load (GetMachineConfigPath ())) throw new ConfigurationException ("Cannot find " + GetMachineConfigPath ()); } string appfile = GetAppConfigPath (); if (appfile == null) { config = data; return; } ConfigurationData appData = new ConfigurationData (data); if (appData.Load (appfile)) config = appData; else config = data; } }