示例#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();
        }