// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Hosting { /// /// A builder for /// public interface IWebHostBuilder { /// /// Builds an which hosts a web application. /// IWebHost Build(); /// /// Specify the to be used by the web host. /// /// The to be used. /// The . IWebHostBuilder UseServer(IServerFactory factory); /// /// Specify the startup type to be used by the web host. /// /// The to be used. /// The . IWebHostBuilder UseStartup(Type startupType); /// /// Specify the delegate that is used to configure the services of the web application. /// /// The delegate that configures the . /// The . IWebHostBuilder ConfigureServices(Action configureServices); /// /// Specify the startup method to be used to configure the web application. /// /// The delegate that configures the . /// The . IWebHostBuilder Configure(Action configureApplication); /// /// Add or replace a setting in the configuration. /// /// The key of the setting to add or replace. /// The value of the setting to add or replace. /// The . IWebHostBuilder UseSetting(string key, string value); /// /// Get the setting value from the configuration. /// /// The key of the setting to look up. /// The value the setting currently contains. string GetSetting(string key); } }