public IModel ImportStreams(string inputFileFullname) { var readLines = new FileHelper().ReadAllLines(inputFileFullname); string value = readLines.Aggregate(string.Empty, (current, line) => current + line); return JsonConvert.DeserializeObject<Model>(value); }
public List<IHistoryItem> LoadHistory(string inputFileFullname) { if (!File.Exists(inputFileFullname)) { return new List<IHistoryItem>(); } var readLines = new FileHelper().ReadAllLines(inputFileFullname); string value = readLines.Aggregate(string.Empty, (current, line) => current + line); return new List<IHistoryItem>(JsonConvert.DeserializeObject<List<HistoryItem>>(value)); }