public static void PrepareMonth(List <string> files, string month)
        {
            Service.BluePrint = string.Format("Month{0}", month);
            Console.WriteLine("Preparing period {0} statistics.", month);
            foreach (var filePath in files)
            {
                var monthOfFile = InfoHelper.GetMonth(filePath);
                if (monthOfFile != month)
                {
                    continue;
                }
                Service.ReadStatisticsData(filePath);
                Service.PrepareData();
            }

            var statistics = Service.CalculateStatistics();

            Service.AddToRepository(statistics);
            Console.WriteLine("Prepared.");
            Service.ResetSequence();
        }
Beispiel #2
0
        public static void PrepareMonth(List <string> files, string month)
        {
            var path = Path.Combine(HistogramPath, string.Format("Histogram_M{0}.csv", month));

            Console.WriteLine("Preparing period {0} histogram.", month);
            foreach (var filePath in files)
            {
                var monthOfFile = InfoHelper.GetMonth(filePath);
                if (monthOfFile != month)
                {
                    continue;
                }
                Service.ReadStatisticsData(filePath);
                Service.PrepareData();
            }

            var statistics = Service.CalculateStatistics();

            Service.AddToRepository(statistics);
            Service.CommitToRepository(path);
            Console.WriteLine("Prepared.");
            Service.Clear();
        }