Exemplo n.º 1
0
        public IHost Build()
        {
            var configuration = _configurationBuilder.Build();

            _serviceCollection.AddSingleton <IConfiguration>(configuration);
            return(new WebHost(_serviceCollection.BuildServiceProvider(), _requestPipeline.Build()));
        }
Exemplo n.º 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()));
        }