public Handler() { var serviceCollection = new ServiceCollection(); ServiceConfigurator.ConfigureServices(serviceCollection); _serviceProvider = serviceCollection.BuildServiceProvider(); }
public Handler(Action <ServiceCollection> configureTestServices) { var serviceCollection = new ServiceCollection(); ServiceConfigurator.ConfigureServices(serviceCollection); configureTestServices?.Invoke(serviceCollection); _serviceProvider = serviceCollection.BuildServiceProvider(); }