Table of Contents

Interface IConfigureHost

Namespace
Invex.Atom.Build.Hosting
Assembly
Invex.Atom.Build.dll

Defines the static host configuration hooks of a build definition.

public interface IConfigureHost

Remarks

The source generator implements this interface on every build definition, whether or not any inherited interface uses ConfigureHostAttribute or ConfigureHostBuilderAttribute. The generated ConfigureHostBuilder(IHostApplicationBuilder) registers the build's module interfaces, calls each ConfigureHostBuilderFrom{InterfaceName} partial method and then the build's optional OnConfigureHostBuilder partial method. The generated ConfigureHost(IHost) calls each ConfigureHostFrom{InterfaceName} partial method and then the build's optional OnConfigureHost partial method.

The members are static so the host can be configured without constructing the build definition: AddAtom<TBuilder, TBuild>(TBuilder, string[]) calls ConfigureHostBuilder(IHostApplicationBuilder) and UseAtom(IHost) calls ConfigureHost(IHost). This interface is intended for framework and generated code; build authors implement the OnConfigureHostBuilder and OnConfigureHost partial methods instead.

Methods

ConfigureHost(IHost)

Configures the Microsoft.Extensions.Hosting.IHost after it has been built.

public static abstract void ConfigureHost(IHost host)

Parameters

host IHost

The built host to configure.

ConfigureHostBuilder(IHostApplicationBuilder)

Configures the Microsoft.Extensions.Hosting.IHostApplicationBuilder before the host is built.

public static abstract void ConfigureHostBuilder(IHostApplicationBuilder builder)

Parameters

builder IHostApplicationBuilder

The host application builder to configure.