示例#1
0
        private IEnumerable <DataAtom> LoadDataFromFile(string file)
        {
            List <DataAtom> data = new List <DataAtom>();

            using (StreamReader sr = File.OpenText(file))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    data.Add(DataAtom.FromString(line));
                }
            }

            return(data);
        }
示例#2
0
        private List <DataAtom> ReadAggregatedListFromFile(string fileName)
        {
            List <DataAtom> result = new List <DataAtom>();

            using (StreamReader sr = File.OpenText(fileName))
            {
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    result.Add(DataAtom.FromString(line));
                }
            }

            return(result);
        }