public static void Main(string[] args) { var dataPath = GetCurrentDataFolderPath(); var jsonFilesInDirectory = Directory.EnumerateFiles(dataPath).Where(file => file.Remove(0, file.Length - 5) == ".json"); var predictions = FileReaderService.LoadPredictions(jsonFilesInDirectory); var slaughterWeights = FileReaderService.LoadSlaughterWeights(jsonFilesInDirectory); var slaughterStatistics = StatisticsService.CreateSlaughterStatistics(predictions, slaughterWeights); JsonWriterService.WriteStatisticsFile(slaughterStatistics, dataPath, _statisticsFileName); }