Hosting and startup abstractions for applications.
$ dotnet add package Microsoft.Extensions.Hosting.AbstractionsContains abstractions to host user code in an application by encapsulating an application's resources and lifetime functionality including:
This package is also used to wire up specific application models like ASP.NET Core that are built on top of hosting.
BackgroundService base class and the IHostedService interface for implementing worker services.See the Conceptual documentation below for using BackgroundService and IHostedService to host worker services.
The main types provided by this library are:
Microsoft.Extensions.Hosting.BackgroundServiceMicrosoft.Extensions.Hosting.IHostBuilderMicrosoft.Extensions.Hosting.IHostedServiceMicrosoft.Extensions.HostingMicrosoft.Extensions.Configuration.AbstractionsMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Diagnostics.AbstractionsMicrosoft.Extensions.FileProviders.AbstractionsMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.Hosting.Abstractions is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.