HostingHostBuilderExtensions extension

Provides extension methods for the HostBuilder from the hosting package.

on

Methods

configureDefaults([List<String>? args]) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Configures an existing HostBuilder instance with pre-configured defaults.
configureHostOptions(void configureOptions(HostBuilderContext context, HostOptions options)) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Adds a delegate for configuring the HostOptions of the Host.
configureLogging(void configure(HostBuilderContext context, LoggingBuilder logging)) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Adds a delegate for configuring the provided LoggingBuilder. This can be called multiple times.
createDefaultServiceProviderOptions(HostBuilderContext context) ServiceProviderOptions

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

useContentRoot(String contentRoot) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Specifies the content root directory to be used by the host.
useDefaultServiceProvider(ConfigureDefaultServiceProvider configure) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Specify the ServiceProvider to be the default one.
useEnvironment(String environment) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Specify the environment to be used by the host.