1 implementation of IWebHost
Microsoft.AspNetCore.Hosting (1)
Internal\WebHost.cs (1)
23
internal sealed partial class WebHost :
IWebHost
, IAsyncDisposable
83 references to IWebHost
Aspire.Dashboard.Tests (2)
Integration\MockOpenIdAuthority.cs (2)
26
var
webHost = new WebHostBuilder()
130
public sealed class Authority(
IWebHost
webHost, string url) : IAsyncDisposable
Microsoft.AspNetCore (22)
ConfigureWebHostBuilder.cs (1)
32
IWebHost
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>
36
public 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>
46
public 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>
58
public 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>
68
public 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>
80
public 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>
90
public static
IWebHost
StartWith([StringSyntax(StringSyntaxAttribute.Uri)] string url, Action<IApplicationBuilder> app) =>
93
private static
IWebHost
StartWith(string? url, Action<IServiceCollection>? configureServices, Action<IApplicationBuilder> app, string? applicationName)
114
var
host = builder.Build();
Microsoft.AspNetCore.Hosting (18)
GenericHost\HostingStartupWebHostBuilder.cs (1)
27
public
IWebHost
Build()
GenericHost\WebHostBuilderBase.cs (1)
30
public
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.
131
public
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>
26
public static async Task StopAsync(this
IWebHost
host, TimeSpan timeout)
35
/// <param name="host">The running <see cref="
IWebHost
"/>.</param>
36
public static void WaitForShutdown(this
IWebHost
host)
44
/// <param name="host">The running <see cref="
IWebHost
"/>.</param>
47
public static async Task WaitForShutdownAsync(this
IWebHost
host, CancellationToken token = default)
69
/// <param name="host">The <see cref="
IWebHost
"/> to run.</param>
70
public static void Run(this
IWebHost
host)
78
/// <param name="host">The <see cref="
IWebHost
"/> to run.</param>
80
public static async Task RunAsync(this
IWebHost
host, CancellationToken token = default)
108
private static async Task RunAsync(this
IWebHost
host, CancellationToken token, string? startupMessage)
152
private static async Task WaitForTokenShutdownAsync(this
IWebHost
host, CancellationToken cancellationToken)
Microsoft.AspNetCore.Hosting.Abstractions (13)
HostingAbstractionsWebHostBuilderExtensions.cs (2)
173
public static
IWebHost
Start(this IWebHostBuilder hostBuilder, [StringSyntax(StringSyntaxAttribute.Uri)] params string[] urls)
175
var
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.
20
IWebHost
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)
19
private readonly
IWebHost
_host;
26
public 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>
38
public static void RunAsService(this
IWebHost
host)
Microsoft.AspNetCore.Mvc.Testing (4)
WebApplicationFactory.cs (4)
41
private
IWebHost
? _webHost;
213
private
IWebHost
CreateKestrelServer(IWebHostBuilder builder)
217
var
host = builder.Build();
621
private static IServerAddressesFeature? GetServerAddressFeature(
IWebHost
webHost) => webHost.ServerFeatures.Get<IServerAddressesFeature>();
Microsoft.AspNetCore.TestHost (7)
TestServer.cs (5)
21
private readonly
IWebHost
? _hostInstance;
102
var
host = builder.UseServer(this).Build();
115
/// Gets the <see cref="
IWebHost
" /> instance associated with the test server.
118
public
IWebHost
Host
240
/// Dispose the <see cref="
IWebHost
" /> object associated with the test server.
WebHostBuilderExtensions.cs (2)
58
public static TestServer GetTestServer(this
IWebHost
host)
69
public static HttpClient GetTestClient(this
IWebHost
host)
Microsoft.Extensions.Diagnostics.Probes.Tests (12)
KubernetesProbesExtensionsTests.cs (4)
31
using
var
host = CreateWebHost((services) =>
70
using
var
host = CreateWebHost((services) =>
103
using
var
host = CreateWebHost((services) =>
129
private static
IWebHost
CreateWebHost(Action<IServiceCollection> configureServices)
TcpEndpointProbesExtensionsTests.cs (8)
29
using
var
host = CreateWebHost(services =>
44
using
var
host = CreateWebHost(services =>
66
using
var
host = CreateWebHost(services =>
81
using
var
host = CreateWebHost(services =>
111
using
var
host = CreateWebHost(services =>
136
using
var
host = CreateWebHost(services =>
156
using
var
host = CreateWebHost(services =>
184
private static
IWebHost
CreateWebHost(Action<IServiceCollection> configureServices)