5 implementations of StopAsync
Aspire.Hosting (1)
DistributedApplication.cs (1)
369Task IHost.StopAsync(CancellationToken cancellationToken) => StopAsync(cancellationToken);
Microsoft.AspNetCore (1)
WebApplication.cs (1)
171public Task StopAsync(CancellationToken cancellationToken = default) =>
Microsoft.AspNetCore.Mvc.Testing (1)
DeferredHostBuilder.cs (1)
157public Task StopAsync(CancellationToken cancellationToken = default) => _host.StopAsync(cancellationToken);
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
217public async Task StopAsync(CancellationToken cancellationToken = default)
Microsoft.Extensions.Hosting.Testing (1)
FakeHost.cs (1)
91public async Task StopAsync(CancellationToken cancellationToken = default)
151 references to StopAsync
Aspire.Hosting (2)
DistributedApplication.cs (2)
277/// <inheritdoc cref="IHost.StopAsync" /> 280await _host.StopAsync(cancellationToken).ConfigureAwait(false);
InMemory.FunctionalTests (2)
TestTransport\TestServer.cs (2)
127return _host.StopAsync(cancellationToken); 142await _host.StopAsync().ConfigureAwait(false);
Interop.FunctionalTests (77)
H2SpecTests.cs (1)
55await host.StopAsync();
Http2\Http2RequestTests.cs (4)
88await host.StopAsync(); 154await host.StopAsync(); 194await host.StopAsync(); 275var stopTask = host.StopAsync();
Http3\Http3RequestTests.cs (30)
115await host.StopAsync(); 268await host.StopAsync(); 312await host.StopAsync(); 366await host.StopAsync(); 442await host.StopAsync().DefaultTimeout(); 524await host.StopAsync().DefaultTimeout(); 590await host.StopAsync().DefaultTimeout(); 642await host.StopAsync().DefaultTimeout(); 698await host.StopAsync().DefaultTimeout(); 743await host.StopAsync().DefaultTimeout(); 793await host.StopAsync(); 877await host.StopAsync(); 954await host.StopAsync(); 1049await host.StopAsync().DefaultTimeout(); 1147await host.StopAsync().DefaultTimeout(); 1272await host.StopAsync().DefaultTimeout(); 1333await host.StopAsync().DefaultTimeout(); 1396await host.StopAsync(); 1449await host.StopAsync(); 1511await host.StopAsync(); 1569await host.StopAsync(); 1621await host.StopAsync(); 1673await host.StopAsync(); 1737await host.StopAsync(); 1833await host.StopAsync(); 1910await host.StopAsync().DefaultTimeout(); 1978await host.StopAsync(); 2058var stopTask = host.StopAsync(); 2158var stopTask = host.StopAsync(); 2197await host.StopAsync().DefaultTimeout();
Http3\Http3TlsTests.cs (7)
69await host.StopAsync().DefaultTimeout(); 113await host.StopAsync().DefaultTimeout(); 155await host.StopAsync().DefaultTimeout(); 214await host.StopAsync().DefaultTimeout(); 252await host.StopAsync().DefaultTimeout(); 335await host.StopAsync().DefaultTimeout(); 500await host.StopAsync().DefaultTimeout();
HttpClientHttp2InteropTests.cs (35)
67await host.StopAsync().DefaultTimeout(); 96await host.StopAsync().DefaultTimeout(); 144await host.StopAsync().DefaultTimeout(); 193await host.StopAsync().DefaultTimeout(); 313await host.StopAsync().DefaultTimeout(); 395await host.StopAsync().DefaultTimeout(); 448await host.StopAsync().DefaultTimeout(); 541await host.StopAsync().DefaultTimeout(); 577await host.StopAsync().DefaultTimeout(); 601await host.StopAsync().DefaultTimeout(); 630await host.StopAsync().DefaultTimeout(); 657await host.StopAsync().DefaultTimeout(); 689await host.StopAsync().DefaultTimeout(); 746await host.StopAsync().DefaultTimeout(); 805await host.StopAsync().DefaultTimeout(); 851await host.StopAsync().DefaultTimeout(); 896await host.StopAsync().DefaultTimeout(); 938await host.StopAsync().DefaultTimeout(); 978await host.StopAsync().DefaultTimeout(); 1019await host.StopAsync().DefaultTimeout(); 1071await host.StopAsync().DefaultTimeout(); 1120await host.StopAsync().DefaultTimeout(); 1180await host.StopAsync().DefaultTimeout(); 1244await host.StopAsync().DefaultTimeout(); 1305await host.StopAsync().DefaultTimeout(); 1338await host.StopAsync().DefaultTimeout(); 1373await host.StopAsync().DefaultTimeout(); 1404await host.StopAsync().DefaultTimeout(); 1449await host.StopAsync().DefaultTimeout(); 1485await host.StopAsync().DefaultTimeout(); 1540await host.StopAsync().DefaultTimeout(); 1571await host.StopAsync().DefaultTimeout(); 1593await host.StopAsync().DefaultTimeout(); 1638await host.StopAsync().DefaultTimeout(); 1683await host.StopAsync().DefaultTimeout();
Microsoft.AspNetCore (1)
WebApplication.cs (1)
172_host.StopAsync(cancellationToken);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Latency\AcceptanceTests.cs (1)
79await host.StopAsync();
Logging\AcceptanceTests.cs (1)
132await host.StopAsync();
Microsoft.AspNetCore.Hosting.Tests (1)
Fakes\GenericWebHost.cs (1)
30public Task StopAsync(CancellationToken cancellationToken = default) => _host.StopAsync(cancellationToken);
Microsoft.AspNetCore.Mvc.Testing (2)
DeferredHostBuilder.cs (1)
157public Task StopAsync(CancellationToken cancellationToken = default) => _host.StopAsync(cancellationToken);
WebApplicationFactory.cs (1)
596await _host.StopAsync().ConfigureAwait(false);
Microsoft.AspNetCore.Routing.FunctionalTests (1)
RouteHandlerTest.cs (1)
103await host.StopAsync();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
WebHostTests.cs (6)
92await host.StopAsync(); 135await host.StopAsync().DefaultTimeout(); 170await host.StopAsync().DefaultTimeout(); 207await host.StopAsync().DefaultTimeout(); 274await host.StopAsync().DefaultTimeout(); 343await host.StopAsync().DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\InProcessTestServer.cs (1)
166await _host.StopAsync();
Microsoft.AspNetCore.WebSockets.Tests (1)
KestrelWebSocketHelpers.cs (1)
79await host.StopAsync();
Microsoft.Extensions.AmbientMetadata.Application.Tests (1)
AcceptanceTests.cs (1)
61await host.StopAsync();
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
KubernetesProbesOptionsValidatorTests.cs (1)
84await host.StopAsync();
Microsoft.Extensions.Hosting (1)
HostOptions.cs (1)
17/// Gets or sets the default timeout for <see cref="IHost.StopAsync(CancellationToken)"/>.
Microsoft.Extensions.Hosting.Abstractions (3)
HostingAbstractionsHostExtensions.cs (2)
35await host.StopAsync(cts.Token).ConfigureAwait(false); 115await host.StopAsync(CancellationToken.None).ConfigureAwait(false);
IHostLifetime.cs (1)
23/// Called from <see cref="IHost.StopAsync(CancellationToken)"/> to indicate that the host is stopping and it's time to shut down.
Microsoft.Extensions.Hosting.Systemd (1)
SystemdLifetime.cs (1)
51/// Asynchronously stops and shuts down the host. This method is called from <see cref="IHost.StopAsync(CancellationToken)" />.
Microsoft.Extensions.Hosting.Testing (3)
FakeHost.cs (2)
97await _host.StopAsync(cancellationTokenSource.Token).ConfigureAwait(false); 104await _host.StopAsync(linkedTokenSource.Token).ConfigureAwait(false);
HostTerminatorService.cs (1)
59await _host.StopAsync(combinedTokenSource.Token).ConfigureAwait(false);
Microsoft.Extensions.Hosting.Testing.Tests (6)
FakeHostTests.cs (5)
104.Setup(x => x.StopAsync(It.Is<CancellationToken>(y => y != default))) 121.Setup(x => x.StopAsync(It.Is<CancellationToken>(y => y != tokenSource.Token))) 141.Setup(x => x.StopAsync(It.Is<CancellationToken>(y => y != cancellationTokenSource.Token))) 163hostMock.Setup(x => x.StopAsync(It.IsAny<CancellationToken>())).Returns(Task.CompletedTask); 176hostMock.Setup(x => x.StopAsync(It.IsAny<CancellationToken>())).Returns(Task.CompletedTask);
HostTerminatorServiceTests.cs (1)
37hostMock.Setup(x => x.StopAsync(It.IsAny<CancellationToken>())).Returns(Task.CompletedTask);
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetime.cs (1)
112/// Asynchronously stops and shuts down the host. This method is called from <see cref="IHost.StopAsync(CancellationToken)" />.
Negotiate.Server (1)
Program.cs (1)
20await host2.StopAsync();
SampleStartups (1)
StartupBlockingOnStart.cs (1)
51await host.StopAsync();
Sockets.BindTests (21)
SocketTransportOptionsTests.cs (1)
44await host.StopAsync();
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
148return _host.StopAsync(token); 153await _host.StopAsync().ConfigureAwait(false);
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (18)
220await host.StopAsync(); 266await host.StopAsync(); 339await host.StopAsync(); 395await host.StopAsync(); 442await host.StopAsync(); 529await host.StopAsync(); 562await host.StopAsync(); 598await host.StopAsync(); 643await host.StopAsync(); 687await host.StopAsync(); 724await host.StopAsync(); 760await host.StopAsync(); 785await host.StopAsync(); 813await host.StopAsync(); 833await host.StopAsync(); 865await host.StopAsync(); 887await host.StopAsync(); 922await host.StopAsync();
Sockets.FunctionalTests (15)
SocketTransportTests.cs (1)
58await host.StopAsync();
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
148return _host.StopAsync(token); 153await _host.StopAsync().ConfigureAwait(false);
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (2)
207await host.StopAsync(); 282await host.StopAsync();
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (6)
143await host.StopAsync(); 190await host.StopAsync(); 581await host.StopAsync(); 624await host.StopAsync(); 724await host.StopAsync(); 1133await host.StopAsync();
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
96await host.StopAsync(); 142await host.StopAsync();
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (2)
122await host.StopAsync().DefaultTimeout(); 194await host.StopAsync().DefaultTimeout();