1 implementation of IWebHost
Microsoft.AspNetCore.Hosting (1)
Internal\WebHost.cs (1)
23internal sealed partial class WebHost : IWebHost, IAsyncDisposable
83 references to IWebHost
Aspire.Dashboard.Tests (2)
Integration\MockOpenIdAuthority.cs (2)
26var webHost = new WebHostBuilder() 130public sealed class Authority(IWebHost webHost, string url) : IAsyncDisposable
Microsoft.AspNetCore (22)
ConfigureWebHostBuilder.cs (1)
32IWebHost IWebHostBuilder.Build()
WebHost.cs (21)
25/// Provides convenience methods for creating instances of <see cref="IWebHost"/> and <see cref="IWebHostBuilder"/> with pre-configured defaults. 31/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 35/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 36public static IWebHost Start(RequestDelegate app) => 40/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 45/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 46public static IWebHost Start([StringSyntax(StringSyntaxAttribute.Uri)] string url, RequestDelegate app) 53/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 57/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 58public static IWebHost Start(Action<IRouteBuilder> routeBuilder) => 62/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 67/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 68public static IWebHost Start([StringSyntax(StringSyntaxAttribute.Uri)] string url, Action<IRouteBuilder> routeBuilder) 75/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 79/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 80public static IWebHost StartWith(Action<IApplicationBuilder> app) => 84/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. 89/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> 90public static IWebHost StartWith([StringSyntax(StringSyntaxAttribute.Uri)] string url, Action<IApplicationBuilder> app) => 93private static IWebHost StartWith(string? url, Action<IServiceCollection>? configureServices, Action<IApplicationBuilder> app, string? applicationName) 114var host = builder.Build();
Microsoft.AspNetCore.Hosting (18)
GenericHost\HostingStartupWebHostBuilder.cs (1)
27public IWebHost Build()
GenericHost\WebHostBuilderBase.cs (1)
30public IWebHost Build()
WebHostBuilder.cs (3)
22/// A builder for <see cref="IWebHost"/> 129/// Builds the required services and an <see cref="IWebHost"/> which hosts a web application. 131public IWebHost Build()
WebHostExtensions.cs (13)
14/// Contains extensions for managing the lifecycle of an <see cref="IWebHost"/>. 25/// <returns>A <see cref="Task"/> that completes when the <see cref="IWebHost"/> stops.</returns> 26public static async Task StopAsync(this IWebHost host, TimeSpan timeout) 35/// <param name="host">The running <see cref="IWebHost"/>.</param> 36public static void WaitForShutdown(this IWebHost host) 44/// <param name="host">The running <see cref="IWebHost"/>.</param> 47public static async Task WaitForShutdownAsync(this IWebHost host, CancellationToken token = default) 69/// <param name="host">The <see cref="IWebHost"/> to run.</param> 70public static void Run(this IWebHost host) 78/// <param name="host">The <see cref="IWebHost"/> to run.</param> 80public static async Task RunAsync(this IWebHost host, CancellationToken token = default) 108private static async Task RunAsync(this IWebHost host, CancellationToken token, string? startupMessage) 152private static async Task WaitForTokenShutdownAsync(this IWebHost host, CancellationToken cancellationToken)
Microsoft.AspNetCore.Hosting.Abstractions (13)
HostingAbstractionsWebHostBuilderExtensions.cs (2)
173public static IWebHost Start(this IWebHostBuilder hostBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] params string[] urls) 175var host = hostBuilder.UseUrls(urls).Build();
HostingStartupAttribute.cs (1)
9/// Marker attribute indicating an implementation of <see cref="IHostingStartup"/> that will be loaded and executed when building an <see cref="IWebHost"/>.
IHostingStartup.cs (1)
7/// Represents platform specific configuration that will be applied to a <see cref="IWebHostBuilder"/> when building an <see cref="IWebHost"/>.
IWebHost.cs (2)
34/// <returns>A <see cref="Task"/> that completes when the <see cref="IWebHost"/> starts.</returns> 41/// <returns>A <see cref="Task"/> that completes when the <see cref="IWebHost"/> stops.</returns>
IWebHostBuilder.cs (3)
12/// A builder for <see cref="IWebHost"/>. 17/// Builds an <see cref="IWebHost"/> which hosts a web application. 20IWebHost Build();
WebHostBuilderContext.cs (4)
9/// Context containing the common services on the <see cref="IWebHost" />. Some properties may be null until set by the <see cref="IWebHost" />. 14/// The <see cref="IWebHostEnvironment" /> initialized by the <see cref="IWebHost" />. 19/// The <see cref="IConfiguration" /> containing the merged configuration of the application and the <see cref="IWebHost" />.
Microsoft.AspNetCore.Hosting.WindowsServices (5)
WebHostService.cs (2)
19private readonly IWebHost _host; 26public WebHostService(IWebHost host)
WebHostWindowsServiceExtensions.cs (3)
10/// Extensions to <see cref="IWebHost"/> for hosting inside a Windows service. 18/// <param name="host">An instance of the <see cref="IWebHost"/> to host in the Windows service.</param> 38public static void RunAsService(this IWebHost host)
Microsoft.AspNetCore.Mvc.Testing (4)
WebApplicationFactory.cs (4)
41private IWebHost? _webHost; 213private IWebHost CreateKestrelServer(IWebHostBuilder builder) 217var host = builder.Build(); 621private static IServerAddressesFeature? GetServerAddressFeature(IWebHost webHost) => webHost.ServerFeatures.Get<IServerAddressesFeature>();
Microsoft.AspNetCore.TestHost (7)
TestServer.cs (5)
21private readonly IWebHost? _hostInstance; 102var host = builder.UseServer(this).Build(); 115/// Gets the <see cref="IWebHost" /> instance associated with the test server. 118public IWebHost Host 240/// Dispose the <see cref="IWebHost" /> object associated with the test server.
WebHostBuilderExtensions.cs (2)
58public static TestServer GetTestServer(this IWebHost host) 69public static HttpClient GetTestClient(this IWebHost host)
Microsoft.Extensions.Diagnostics.Probes.Tests (12)
KubernetesProbesExtensionsTests.cs (4)
31using var host = CreateWebHost((services) => 70using var host = CreateWebHost((services) => 103using var host = CreateWebHost((services) => 129private static IWebHost CreateWebHost(Action<IServiceCollection> configureServices)
TcpEndpointProbesExtensionsTests.cs (8)
29using var host = CreateWebHost(services => 44using var host = CreateWebHost(services => 66using var host = CreateWebHost(services => 81using var host = CreateWebHost(services => 111using var host = CreateWebHost(services => 136using var host = CreateWebHost(services => 156using var host = CreateWebHost(services => 184private static IWebHost CreateWebHost(Action<IServiceCollection> configureServices)