public static RecentExpensesSettings LoadSettings(string settings) { var config = new RecentExpensesSettings(); if (!string.IsNullOrEmpty(settings)) { try { config = JsonConvert.DeserializeObject<RecentExpensesSettings>(settings); } catch (JsonReaderException) { } } return config; }
public void SetConfiguration(IReadOnlyBook book, string settings) { this.settings = LoadSettings(settings); }