Table of Contents

Class AtomHost

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

Provides static methods for creating and running an Atom host application.

public static class AtomHost
Inheritance
object
AtomHost

Remarks

This class simplifies the setup and execution of an Atom host by configuring the necessary services and application settings based on a specified build definition.

Methods

CreateAtomBuilder<T>(string[])

Creates and configures a Microsoft.Extensions.Hosting.HostApplicationBuilder for an Atom application.

public static HostApplicationBuilder CreateAtomBuilder<T>(string[] args) where T : BuildDefinition, IConfigureHost

Parameters

args string[]

The command-line arguments for the application.

Returns

HostApplicationBuilder

A configured Microsoft.Extensions.Hosting.HostApplicationBuilder ready for further customization or building.

Type Parameters

T

The BuildDefinition type to configure the host with. Its static IConfigureHost hooks are called without constructing it; classes generated for BuildDefinitionAttribute implement them.

Run<T>(string[])

Builds and runs an Atom application using the specified build definition.

public static void Run<T>(string[] args) where T : BuildDefinition, IConfigureHost

Parameters

args string[]

The command-line arguments for the application.

Type Parameters

T

The BuildDefinition type to configure and run the application with, which must implement IConfigureHost.

Remarks

This method handles the complete setup, build, and execution lifecycle of the host.