示例#1
0
        public static RecentExpensesSettings LoadSettings(string settings)
        {
            var config = new RecentExpensesSettings();

            if (!string.IsNullOrEmpty(settings))
            {
                try
                {
                    config = JsonConvert.DeserializeObject<RecentExpensesSettings>(settings);
                }
                catch (JsonReaderException)
                {
                }
            }

            return config;
        }
示例#2
0
 public void SetConfiguration(IReadOnlyBook book, string settings)
 {
     this.settings = LoadSettings(settings);
 }