HostBuilder class abstract

A program initialization abstraction.

Implementers
Available extensions

Constructors

HostBuilder()

Properties

hashCode int
The hash code for this object.
no setterinherited
properties Map<Object, Object>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() Host
configureAppConfiguration(ConfigureAppConfigurationDelegate configureDelegate) HostBuilder
configureContainer<TContainerBuilder>(ConfigureContainerAdapterDelegate<TContainerBuilder> configureDelegate) HostBuilder
configureDefaults([List<String>? args]) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Configures an existing HostBuilder instance with pre-configured defaults.
configureHostConfiguration(ConfigureHostConfigurationDelegate configureDelegate) HostBuilder
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 may be called multiple times.
configureServices(ConfigureServicesDelegate configureDelegate) HostBuilder
createDefaultServiceProviderOptions(HostBuilderContext context) ServiceProviderOptions

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start({CancellationToken? cancellationToken}) Future<Host>

Available on HostBuilder, provided by the HostingAbstractionsHostBuilderExtensions extension

Builds and starts the host.
toString() String
A string representation of this object.
inherited
useContentRoot(String contentRoot) HostBuilder

Available on HostBuilder, provided by the HostingHostBuilderExtensions extension

Specify 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.
useServiceProviderFactory<TContainerBuilder>({ServiceProviderFactory<TContainerBuilder>? implementation, FactoryResolver<TContainerBuilder>? factory}) HostBuilder

Operators

operator ==(Object other) bool
The equality operator.
inherited