示例#1
0
        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);
        }
示例#2
0
        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));
        }