private void saveMainO2ConfigFile() { Files.WriteFileContent(O2ConfigLoader.defaultLocationOfO2ConfigFile(), (string)tbMainO2ConfigFile.Text); var kO2Config = O2ConfigLoader.getKO2Config(); // get the updated KO2Config object O2ConfigLoader.mergeO2ConfigFiles(kO2Config, DI.config); // and merge it with the current one loadCurrentO2ConfigEnvironment(); }
private void saveLocalO2ConfigFile(string localO2ConfigFileLocation, string localO2ConfigFileContent) { if (false == doesTextBreaksO2ConfigSchema(localO2ConfigFileContent)) { Files.WriteFileContent(localO2ConfigFileLocation, localO2ConfigFileContent); DI.config.dependenciesInjection.Clear(); // hack to handle reload of new config O2ConfigLoader.mergeO2ConfigFiles(O2ConfigLoader.loadO2Config(localO2ConfigFileLocation, false), DI.config); loadCurrentO2ConfigEnvironment(); } }