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

Microsoft.Extensions.Hosting.HostBuilderContext

public class HostBuilderContext
Context containing the common services on the IHost. Some properties may be null until set by the IHost.
public IConfiguration Configuration { get; set; }

The IConfiguration containing the merged configuration of the application and the IHost.

public IHostEnvironment HostingEnvironment { get; set; }

The IHostEnvironment initialized by the IHost.

public IDictionary<object, object> Properties { get; }

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

public HostBuilderContext(IDictionary<object, object> properties)

Initializes a new instance of HostBuilderContext.