HostingAbstractionsHostExtensions Class

Definition

Provides extension methods for the IHost from the hosting abstractions package.

public ref class HostingAbstractionsHostExtensions abstract sealed
public static class HostingAbstractionsHostExtensions
type HostingAbstractionsHostExtensions = class
Public Module HostingAbstractionsHostExtensions
Inheritance
HostingAbstractionsHostExtensions

Methods

Run(IHost)

Runs an application and blocks the calling thread until host shutdown is triggered and all IHostedService instances are stopped.

RunAsync(IHost, CancellationToken)

Runs an application and returns a Task that only completes when the token is triggered or shutdown is triggered and all IHostedService instances are stopped.

Start(IHost)

Starts the host synchronously.

StopAsync(IHost, TimeSpan)

Attempts to gracefully stop the host with the given timeout.

WaitForShutdown(IHost)

Blocks the calling thread until shutdown is triggered via Ctrl+C or SIGTERM.

WaitForShutdownAsync(IHost, CancellationToken)

Returns a Task that completes when shutdown is triggered via the given token.

Applies to