<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.10" />

Microsoft.Extensions.Hosting.IHostApplicationBuilder

public interface IHostApplicationBuilder
Represents a hosted applications and services builder which helps manage configuration, logging, lifetime, and more.
IConfigurationManager Configuration { get; }

Gets the set of key/value configuration properties.

Gets the information about the hosting environment an application is running in.

ILoggingBuilder Logging { get; }

Gets a collection of logging providers for the application to compose. This is useful for adding new logging providers.

IMetricsBuilder Metrics { get; }

Gets a builder that allows enabling metrics and directing their output.

IDictionary<object, object> Properties { get; }

Gets a central location for sharing state between components during the host building process.

IServiceCollection Services { get; }

Gets a collection of services for the application to compose. This is useful for adding user provided or framework provided services.

void ConfigureContainer<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory, Action<TContainerBuilder> configure = null)

Registers a IServiceProviderFactory<T> instance to be used to create the IServiceProvider.