Microsoft.Extensions.Hosting Namespace

Classes

BackgroundService

Base class for implementing a long running IHostedService.

ConsoleLifetimeOptions
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.

Host
HostBuilder

A program initialization utility.

HostBuilderContext

Context containing the common services on the IHost. Some properties may be null until set by the IHost.

HostDefaults

Constants for HostBuilder configuration keys.

HostEnvironmentEnvExtensions

Extension methods for IHostEnvironment.

HostingAbstractionsHostBuilderExtensions
HostingAbstractionsHostExtensions
HostingEnvironmentExtensions

Extension methods for IHostingEnvironment.

HostingHostBuilderExtensions
HostOptions

Options for IHost

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.

IHostApplicationLifetime

Allows consumers to be notified of application lifetime events.

IHostBuilder

A program initialization abstraction.

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