Пример #1
0
        public Handler()
        {
            var serviceCollection = new ServiceCollection();

            ServiceConfigurator.ConfigureServices(serviceCollection);

            _serviceProvider = serviceCollection.BuildServiceProvider();
        }
Пример #2
0
        public Handler(Action <ServiceCollection> configureTestServices)
        {
            var serviceCollection = new ServiceCollection();

            ServiceConfigurator.ConfigureServices(serviceCollection);
            configureTestServices?.Invoke(serviceCollection);

            _serviceProvider = serviceCollection.BuildServiceProvider();
        }