Example #1
0
        static void Main(string[] args)
        {
            var configuration = new ConfigurationBuilder()
                                .SetBasePath(Directory.GetCurrentDirectory())
                                .AddJsonFile("config.json")
                                .AddCommandLine(args)
                                .Build();

            var fileLocations = configuration
                                .GetSection("fileLocations")
                                .Get <FileLocations>();

            var verbose = bool.Parse(configuration["verbose"]);

            // create a repository used to load/save data
            var repository = CreateRepository(fileLocations, Directory.GetCurrentDirectory());

            // create an instance of the planner that contains the logic to create assignments
            var taskPlanner = CreatePlanner(repository);

            // create a UI view appropriate for a console application
            var view = new ConsoleView(verbose);

            var datasetChoices = CreateDatasetChoices(fileLocations);

            // the harness invokes the planner and reports the results
            var harness =
                new Harness(
                    candidateName,
                    repository,
                    taskPlanner,
                    datasetChoices,
                    view);

            harness.Execute();
        }