Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

HostingAbstractionsHostExtensions.StopAsync(IHost, TimeSpan) Method

Definition

Namespace:
Microsoft.Extensions.Hosting
Assembly:
Microsoft.Extensions.Hosting.Abstractions.dll
Package:
Microsoft.Extensions.Hosting.Abstractions v11.0.0-preview.5.26302.115
Source:
HostingAbstractionsHostExtensions.cs
Source:
HostingAbstractionsHostExtensions.cs
Source:
HostingAbstractionsHostExtensions.cs
Source:
HostingAbstractionsHostExtensions.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Attempts to gracefully stop the host with the given timeout.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ StopAsync(Microsoft::Extensions::Hosting::IHost ^ host, TimeSpan timeout);
public static System.Threading.Tasks.Task StopAsync(this Microsoft.Extensions.Hosting.IHost host, TimeSpan timeout);
static member StopAsync : Microsoft.Extensions.Hosting.IHost * TimeSpan -> System.Threading.Tasks.Task
<Extension()>
Public Function StopAsync (host As IHost, timeout As TimeSpan) As Task

Parameters

host
IHost

The IHost to stop.

timeout
TimeSpan

The timeout for stopping gracefully. Once expired the server may terminate any remaining active connections.

Returns

The Task that represents the asynchronous operation.

Applies to


Feedback

Was this page helpful?