예제 #1
0
        public IHost Build()
        {
            var configuration = _configurationBuilder.Build();

            _serviceCollection.AddSingleton <IConfiguration>(configuration);
            return(new WebHost(_serviceCollection.BuildServiceProvider(), _requestPipeline.Build()));
        }
예제 #2
0
        public IHost Build()
        {
            var configuration = _configurationBuilder.Build();

            _serviceCollection.AddSingleton <IConfiguration>(configuration);
            var serviceProvider = _serviceCollection.BuildServiceProvider();

            _initAction?.Invoke(configuration, serviceProvider);

            return(new WebHost(serviceProvider, _requestPipeline.Build()));
        }