예제 #1
0
        private CalendarSettings GetSettings()
        {
            try
            {
                string json = _settingsFileReader.ReadJson();

                CalendarSettings settings = JsonConvert.DeserializeObject <CalendarSettings>(json);
                return(settings);
            }
            catch
            {
                return(new CalendarSettings());
            }
        }
예제 #2
0
 public CalendarSettingsProvider(ISettingsFileReader settingsFileReader)
 {
     _settingsFileReader = settingsFileReader;
     _settings           = GetSettings();
 }