Microsoft.Extensions.Hosting.Internal.ConsoleLifetime
Listens for Ctrl+C or SIGTERM and initiates shutdown.
public ConsoleLifetime(IOptions<ConsoleLifetimeOptions> options, IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, IOptions<HostOptions> hostOptions)
Initializes a ConsoleLifetime instance using the specified console lifetime options, host environment, host application lifetime, and host options.
public ConsoleLifetime(IOptions<ConsoleLifetimeOptions> options, IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, IOptions<HostOptions> hostOptions, ILoggerFactory loggerFactory)
Initializes a ConsoleLifetime instance using the specified console lifetime options, host environment, host options, and logger factory.
Unregisters the shutdown handlers and disposes the application start and application stop registrations.
This method does nothing.
Registers the application start, application stop and shutdown handlers for this application.