public static FavoriteAccountSettings LoadSettings(string settings)
        {
            var config = new FavoriteAccountSettings();

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

            return config;
        }
示例#2
0
        public static FavoriteAccountSettings LoadSettings(string settings)
        {
            var config = new FavoriteAccountSettings();

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

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