public static void Load() { if (File.Exists(FILENAME)) AlertConfig = UserConfigService.Encrypted ? JsonConvert.DeserializeObject<AlertConfig>(EncryptionService.AesDecryptString(File.ReadAllText(FILENAME))) : JsonConvert.DeserializeObject<AlertConfig>(File.ReadAllText(FILENAME)); else Create(); AlertConfig.Alerts.ForEach(x => x.LastOperator = null); }
private static List <CoinConfig> LoadEncrypted(string portfolio) { return(JsonConvert.DeserializeObject <List <CoinConfig> >(EncryptionService.AesDecryptString(File.ReadAllText(portfolio))) ?? new List <CoinConfig>()); }