HostingHostBuilderExtensions extension
- on
Methods
-
runConsole(
[CancellationToken? cancellationToken]) → Future< void> - Enables console support, builds and starts the host, and waits for Ctrl+C or SIGTERM to shut down.
-
useConsoleLifetime(
[void configure(ConsoleLifetimeOptions options)?]) → HostBuilder - Listens for Ctrl+C or SIGTERM and calls HostApplicationLifetime.stopApplication to start the shutdown process. This will unblock extensions like RunAsync and WaitForShutdownAsync.
Static Methods
-
addDefaultServices(
HostBuilderContext hostingContext, ServiceCollection services) → void -
applyDefaultHostConfiguration(
ConfigurationBuilder hostConfigBuilder, List< String> ? args) → void -
createDefaultServiceProviderOptions(
HostBuilderContext context) → ServiceProviderOptions