Microsoft.Extensions.Hosting.Abstractions Base class for implementing a long running . This method is called when the starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed. Triggered when is called. A that represents the long running operations. Triggered when the application host is ready to start the service. Indicates that the start process has been aborted. Triggered when the application host is performing a graceful shutdown. Indicates that the shutdown process should no longer be graceful. Commonly used environment names. Context containing the common services on the . Some properties may be null until set by the . The initialized by the . The containing the merged configuration of the application and the . A central location for sharing state between components during the host building process. Constants for HostBuilder configuration keys. The configuration key used to set . The configuration key used to set . The configuration key used to set and . Start the host and listen on the specified urls. The to start. The . Starts the host synchronously. Attempts to gracefully stop the host with the given timeout. The timeout for stopping gracefully. Once expired the server may terminate any remaining active connections. Block the calling thread until shutdown is triggered via Ctrl+C or SIGTERM. The running . Runs an application and block the calling thread until host shutdown. The to run. Runs an application and returns a Task that only completes when the token is triggered or shutdown is triggered. The to run. The token to trigger shutdown. Returns a Task that completes when shutdown is triggered via the given token. The running . The token to trigger shutdown. Extension methods for . Checks if the current hosting environment name is . An instance of . True if the environment name is , otherwise false. Checks if the current hosting environment name is . An instance of . True if the environment name is , otherwise false. Checks if the current hosting environment name is . An instance of . True if the environment name is , otherwise false. Compares the current hosting environment name against the specified value. An instance of . Environment name to validate against. True if the specified name is the same as the current environment, otherwise false. 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. Requests 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. Requests termination of the current application. A program abstraction. The programs configured services. Start the program. Used to abort program start. Attempts to gracefully stop the program. Used to indicate when stop should no longer be graceful. A program initialization abstraction. 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 application. 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 . The same instance of the for chaining. Overrides the factory used to create the service provider. 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 same instance of the for chaining. Run the given actions to initialize the host. This can only be called once. An initialized Defines methods for objects that are managed by the host. Triggered when the application host is ready to start the service. Indicates that the start process has been aborted. Triggered when the application host is performing a graceful shutdown. Indicates that the shutdown process should no longer be graceful. Provides information about the hosting environment an application is running in. Gets or sets the name of the environment. The host automatically sets this property to the value of the of the "environment" key as specified in configuration. Gets or sets the name of the application. This property is automatically set by the host to the assembly containing the application entry point. Gets or sets the absolute path to the directory that contains the application content files. Gets or sets an pointing at . Called at the start of which will wait until it's complete before continuing. This can be used to delay startup until signaled by an external event. Called from to indicate that the host as stopped and clean up resources. Used to indicate when stop should no longer be graceful. Add an registration for the given type. An to register. The to register with. The original .