<commit_before>﻿using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SFA.DAS.EAS.Portal.Jobs.TestHarness.Scenarios;
using SFA.DAS.EAS.Portal.Jobs.TestHarness.Startup;
using SFA.DAS.EAS.Portal.Startup;

namespace SFA.DAS.EAS.Portal.Jobs.TestHarness
{
    public static class Program
    {
        public static async Task Main(string[] args)
        {
            using (var host = CreateHostBuilder(args).Build())
            {
                await host.StartAsync();

                var publishReserveFundingAddedEvent = host.Services.GetService<PublishReserveFundingAddedEvent>();
                await publishReserveFundingAddedEvent.Run();

                await host.WaitForShutdownAsync();
            }
        }

        private static IHostBuilder CreateHostBuilder(string[] args) =>
            new HostBuilder()
                .ConfigureDasAppConfiguration(args)
                .ConfigureDasLogging()
                .UseDasEnvironment()
                //.UseStructureMap()
                .ConfigureServices(s => s.AddDasNServiceBus());
        //todo: DI

        //.ConfigureContainer<Registry>(IoC.Initialize);
    }
}<commit_msg>test harness wip<commit_after>﻿using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SFA.DAS.EAS.Portal.Jobs.TestHarness.Scenarios;
using SFA.DAS.EAS.Portal.Jobs.TestHarness.Startup;
using SFA.DAS.EAS.Portal.Startup;

namespace SFA.DAS.EAS.Portal.Jobs.TestHarness
{
    public static class Program
    {
        public static async Task Main(string[] args)
        {
            using (var host = CreateHostBuilder(args).Build())
            {
                await host.StartAsync();

                var publishReserveFundingAddedEvent = host.Services.GetService<PublishReserveFundingAddedEvent>();
                await publishReserveFundingAddedEvent.Run();

                await host.WaitForShutdownAsync();
            }
        }

        private static IHostBuilder CreateHostBuilder(string[] args) =>
            new HostBuilder()
                .ConfigureDasAppConfiguration(args)
                .ConfigureDasLogging()
                .UseDasEnvironment()
                //.UseStructureMap()
                .ConfigureServices(s => s.AddDasNServiceBus())
                .ConfigureServices(s => s.AddTransient<PublishReserveFundingAddedEvent, PublishReserveFundingAddedEvent>());
        //todo: DI

        //.ConfigureContainer<Registry>(IoC.Initialize);
    }
}
{'fraction_non_alphanumeric': 0.09800859039437719, 'fraction_numerical': 0.0, 'mean_word_length': 2.366622864651774, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2396833', 'n_tokens_mistral': 744, 'n_tokens_neox': 701, 'n_words': 111}