public void ReadTest() { var configurationManager = new ClientSettingsManager(GetPluginManager()); configurationManager.Read("..\\..\\TestFiles\\LegacyTest.hfm", 2); Assert.AreEqual("..\\..\\TestFiles\\LegacyTest.hfm", configurationManager.FileName); Assert.AreEqual(2, configurationManager.FilterIndex); Assert.AreEqual(".hfm", configurationManager.FileExtension); }
private void LoadConfigFile(string filePath, int filterIndex = 1) { Debug.Assert(filePath != null); try { // Read the config file ClientConfiguration.Load(_settingsManager.Read(filePath, filterIndex)); if (ClientConfiguration.Count == 0) { MessageBox.ShowError(Form, "No client configurations were loaded from the given config file.", Core.Application.NameAndVersion); } } catch (Exception ex) { Logger.Error(ex.Message, ex); MessageBox.ShowError(Form, String.Format(CultureInfo.CurrentCulture, "No client configurations were loaded from the given config file.{0}{0}{1}", Environment.NewLine, ex.Message), Core.Application.NameAndVersion); } }