public override List <NamedIndexedList> ConsumeFiles(string parameters, params string[] files)
        {
            List <NamedIndexedList> result = new List <NamedIndexedList>();
            NamedIndexedList        fileWithValues;

            foreach (var file in files)
            {
                fileWithValues = new NamedIndexedList(file);
                CurrentResult  = new List <double>();
                CsvHelper.ReadCsvByLines(file, AddDataLine);
                fileWithValues.SetValuesAutoIndexed(CurrentResult);
            }
            return(result);
        }
Esempio n. 2
0
        public override List <NamedIndexedList> ConsumeFiles(string parameters, params string[] files)
        {
            List <NamedIndexedList> filesWithValues = files.SelectMany(file => CsvHelper.ParseFileToNamedIndexedLists(file, false)).ToList();
            var i = 0;

            result = new NamedIndexedList("combined")
            {
                IndexedValues = filesWithValues.Select(fv => fv.OnlyValues())
                                .Aggregate((list1, list2) => list1.Intersect(list2).ToList())
                                .ToDictionary(val => i++)
            };
            return(new List <NamedIndexedList> {
                result
            });
        }