Microsoft.Extensions.Hosting Indicates if host lifetime status messages should be supressed such as on startup. The default is false. Provides convenience methods for creating instances of with pre-configured defaults. Initializes a new instance of the class with pre-configured defaults. The following defaults are applied to the returned : set the to the result of load host from "DOTNET_" prefixed environment variables load app from 'appsettings.json' and 'appsettings.[].json' load app from User Secrets when is 'Development' using the entry assembly load app from environment variables configure the to log to the console, debug, and event source output enables scope validation on the dependency injection container when is 'Development' The initialized . Initializes a new instance of the class with pre-configured defaults. The following defaults are applied to the returned : set the to the result of load host from "DOTNET_" prefixed environment variables load host from supplied command line args load app from 'appsettings.json' and 'appsettings.[].json' load app from User Secrets when is 'Development' using the entry assembly load app from environment variables load app from supplied command line args configure the to log to the console, debug, and event source output enables scope validation on the dependency injection container when is 'Development' The command line args. The initialized . A program initialization utility. A central location for sharing state between components during the host building process. Set up the configuration for the builder itself. This will be used to initialize the for use later in the build process. This can be called multiple times and the results will be additive. The delegate for configuring the that will be used to construct the for the host. The same instance of the for chaining. Sets up the configuration for the remainder of the build process and application. This can be called multiple times and the results will be additive. The results will be available at for subsequent operations, as well as in . The delegate for configuring the that will be used to construct the for the host. The same instance of the for chaining. Adds services to the container. This can be called multiple times and the results will be additive. The delegate for configuring the that will be used to construct the for the host. The same instance of the for chaining. Overrides the factory used to create the service provider. The type of the builder to create. A factory used for creating service providers. The same instance of the for chaining. Overrides the factory used to create the service provider. A factory used for creating service providers. The type of the builder to create. The same instance of the for chaining. Enables configuring the instantiated dependency container. This can be called multiple times and the results will be additive. The type of the builder to create. The delegate for configuring the that will be used to construct the for the host. The same instance of the for chaining. Run the given actions to initialize the host. This can only be called once. An initialized Specify the environment to be used by the host. The to configure. The environment to host the application in. The . Specify the content root directory to be used by the host. The to configure. Path to root directory of the application. The . Specify the to be the default one. The to configure. The . Specify the to be the default one. The to configure. The delegate that configures the . The . Adds a delegate for configuring the provided . This may be called multiple times. The to configure. The delegate that configures the . The same instance of the for chaining. Adds a delegate for configuring the provided . This may be called multiple times. The to configure. The delegate that configures the . The same instance of the for chaining. Sets up the configuration for the remainder of the build process and application. This can be called multiple times and the results will be additive. The results will be available at for subsequent operations, as well as in . The to configure. The delegate for configuring the that will be used to construct the for the host. The same instance of the for chaining. Adds services to the container. This can be called multiple times and the results will be additive. The to configure. The delegate for configuring the . The same instance of the for chaining. Enables configuring the instantiated dependency container. This can be called multiple times and the results will be additive. The to configure. The delegate for configuring the . The same instance of the for chaining. Listens for Ctrl+C or SIGTERM and calls to start the shutdown process. This will unblock extensions like RunAsync and WaitForShutdownAsync. The to configure. The same instance of the for chaining. Listens for Ctrl+C or SIGTERM and calls to start the shutdown process. This will unblock extensions like RunAsync and WaitForShutdownAsync. The to configure. The delegate for configuring the . The same instance of the for chaining. Enables console support, builds and starts the host, and waits for Ctrl+C or SIGTERM to shut down. The to configure. A that can be used to cancel the console. A that only completes when the token is triggeredor shutdown is triggered. Enables console support, builds and starts the host, and waits for Ctrl+C or SIGTERM to shut down. The to configure. The delegate for configuring the . A that can be used to cancel the console. A that only completes when the token is triggeredor shutdown is triggered. Options for The default timeout for . Allows consumers to perform cleanup during a graceful shutdown. Triggered when the application host has fully started and is about to wait for a graceful shutdown. Triggered when the application host is performing a graceful shutdown. Request may still be in flight. Shutdown will block until this event completes. Triggered when the application host is performing a graceful shutdown. All requests should be complete at this point. Shutdown will block until this event completes. Signals the ApplicationStopping event and blocks until it completes. Signals the ApplicationStarted event and blocks until it completes. Signals the ApplicationStopped event and blocks until it completes. Listens for Ctrl+C or SIGTERM and initiates shutdown. This API supports infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.