﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommandLine;
using TaskSchedulerProfiler.ReportGenerator.Logic;
using TaskSchedulerProfiler.ReportGenerator.Models;

namespace TaskSchedulerProfiler.ReportGenerator
{
    class Program
    {
        static void Main(string[] args)
        {
            CommandLine.Parser.Default.ParseArguments<Options>(args).WithParsed(options=>Run(options));
        }

        private static void Run(Options options)
        {
            var sessionsStatsProvider = new SessionStatsProvider(options.InputFile);
            sessionsStatsProvider.AnalyseInputFile();


            var reportGenerator = new Logic.ReportGenerator(options.OutputDirectory);
            reportGenerator.GeneratReportsFromStats(sessionsStatsProvider.Sessions);
        }
    }
}
