public void loadConfig() { try { var text = File.ReadAllText (Constants.GetConfigPath); config = JsonConvert.DeserializeObject<Config> (text); runConfigConstraints(); onSettingsChangedEventHandler (this); } catch (DirectoryNotFoundException) { } catch (FileNotFoundException) { Directory.CreateDirectory (Constants.GetLocalStoragePath); saveConfig (); } }
public SettingsService() { config = new Config (); }