Microsoft.Extensions.Hosting.Abstractions
Microsoft.Extensions.Hosting.Abstractions
Assembly: Microsoft.Extensions.Hosting.Abstractions.dll
Interfaces
IHost
Represents a host that is configured and ready to execute.
Contains members for starting, stopping, and managing the lifecycle of the host.
IHostBuilder
Used to configure application services and host.
Provides methods to configure the application's services, host settings, and build the actual host.
IHostEnvironment
Provides information about the environment the application is running in.
string EnvironmentName
: Gets the name of the environment the application is running in.string ApplicationName
: Gets the name of the application.string ContentRootPath
: Gets the absolute path to the directory that contains the application content files.IFileProvider ContentRootFileProvider
: Gets an IFileProvider representing the content root.
IHostLifetime
Represents the lifetime of the host.
Responsible for managing the startup and shutdown of the host.
Classes
Host
A default implementation of IHost.
Provides the core functionality for hosting an application.
HostBuilder
A default implementation of IHostBuilder.
Configures and builds an IHost instance.
GenericHostEnvironment
A generic implementation of IHostEnvironment.
Provides a concrete implementation for host environment details.
Extensions
HostConfigurationBuilderExtensions
Extension methods for configuring the host builder.
Provides methods like ConfigureHostConfiguration
and UseContentRoot
.
HostExtensions
Extension methods for configuring the host.
Includes methods such as Run
, Start
, and StopAsync
.
HostBuilderContextExtensions
Extension methods for accessing IHostBuilderContext.
Provides utility to get host builder context information.