HostingHostBuilderExtensions.RunConsoleAsync(IHostBuilder, CancellationToken) HostingHostBuilderExtensions.RunConsoleAsync(IHostBuilder, CancellationToken) Method

Definition

Enables console support, builds and starts the host, and waits for Ctrl+C or SIGTERM to shut down.

public static System.Threading.Tasks.Task RunConsoleAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = null);
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Parameters
hostBuilder
IHostBuilder IHostBuilder

The IHostBuilder to configure.

Returns

Applies to