Microsoft.Extensions.Hosting
Namespace with 20 public types
Classes
HostAbortedException
The exception that is thrown when an is stopped to indicate the Host is stopping gracefully. This exception should not be thrown or handled by user code.
HostBuilderContext
Context containing the common services on the . Some properties may be null until set by the .
Static Classes
EnvironmentName
Commonly used environment names.
This type is obsolete and will be removed in a future version.
The recommended alternative is Microsoft.Extensions.Hosting.Environments.
Environments
Commonly used environment names.
HostDefaults
Constants for HostBuilder configuration keys.
HostEnvironmentEnvExtensions
Extension methods for .
HostingAbstractionsHostBuilderExtensions
Provides extension methods for the from the hosting abstractions package.
HostingAbstractionsHostExtensions
Provides extension methods for the from the hosting abstractions package.
HostingEnvironmentExtensions
Extension methods for .
Abstract Classes
BackgroundService
Base class for implementing a long running .
Interfaces
IApplicationLifetime
Allows consumers to perform cleanup during a graceful shutdown.
This type is obsolete and will be removed in a future version.
The recommended alternative is Microsoft.Extensions.Hosting.IHostApplicationLifetime.
IHost
A program abstraction.
IHostApplicationBuilder
Represents a hosted applications and services builder which helps manage configuration, logging, lifetime, and more.
IHostApplicationLifetime
Allows consumers to be notified of application lifetime events. This interface is not intended to be user-replaceable.
IHostBuilder
A program initialization abstraction.
IHostedLifecycleService
Defines methods that are run before or after
and
.
IHostedService
Defines methods for objects that are managed by the host.
IHostEnvironment
Provides information about the hosting environment an application is running in.
IHostingEnvironment
Provides information about the hosting environment an application is running in.
This type is obsolete and will be removed in a future version.
The recommended alternative is Microsoft.Extensions.Hosting.IHostEnvironment.
IHostLifetime
Tracks host lifetime.