Beispiel #1
0
        private void CustomEvalutationAlgorithm()
        {
            string textualData = ReadDatasetHelper.ReadCSVData();

            string[]           allRows     = ReadDatasetHelper.FetchDataRowsFromText(textualData, '\n');
            List <CSVCarModel> AllCarsList = ReadDatasetHelper.FetchCarList(allRows, ',');

            EvaluationHelper.EvaluateList(AllCarsList);
            List <CSVCarModel> orderedCarList = AllCarsList.OrderByDescending(x => x.Score).ToList();

            ApplyResults(orderedCarList);
        }
Beispiel #2
0
        private CSVCarModel FindCarObjectPerName(string name)
        {
            string textualData = ReadDatasetHelper.ReadCSVData();

            string[]           allRows     = ReadDatasetHelper.FetchDataRowsFromText(textualData, '\n');
            List <CSVCarModel> AllCarsList = ReadDatasetHelper.FetchCarList(allRows, ',');

            var results = AllCarsList.Where(x => x.Name == name);

            // All names are unique so it is also the only one
            return(results.First());
        }