public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
        .ConfigureServices((hostContext, services) =>
        {
            IConfiguration configuration = hostContext.Configuration;

            AutomaticRunnerConfiguration options = configuration.GetSection("AutomaticRunnerConfiguration").Get <AutomaticRunnerConfiguration>();
            services.AddSingleton(options);
            services.AddSingleton <ScenarioService>();
            services.AddSingleton <ResultWriterService>();
            services.AddHostedService <Worker>();
        });
 public ScenarioService(AutomaticRunnerConfiguration automaticRunnerConfiguration, ResultWriterService resultWriterService)
 {
     _automaticRunnerConfiguration = automaticRunnerConfiguration;
     _resultWriterService          = resultWriterService;
 }
 public ResultWriterService(AutomaticRunnerConfiguration automaticRunnerConfiguration)
 => _automaticRunnerConfiguration = automaticRunnerConfiguration;