ApplicationBuilder (generic - includes worker services)

.NET Generic Host - .NET
Learn about the .NET Generic Host, which is responsible for app startup and lifetime management.
https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host?tabs=appbuilder

On how to implement a worker service look at

Template

using Example.WorkerService;

HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>(); // registered via DI

IHost host = builder.Build();
host.Run();

Settings

When you build the following settings are made

Framework-Provided Services

The following services are registered on build