Table of Contents

UseBootstrapperLifetime Method

Definition

Namespace
Codebelt.Bootstrapper
Assemblies
Codebelt.Bootstrapper.dll
Source
src/Codebelt.Bootstrapper/HostBuilderExtensions.cs

UseBootstrapperLifetime(IHostBuilder)

Listens for Ctrl+C or SIGTERM and calls StopApplication() to start the shutdown process.

public static IHostBuilder UseBootstrapperLifetime(this IHostBuilder hostBuilder)

Parameters

hostBuilder IHostBuilder

The IHostBuilder to configure.

Returns

IHostBuilder

The same instance of the IHostBuilder for chaining.

Remarks

Complements the default implementation of ConsoleLifetime.