Table of Contents

Class ConsoleStartup

Namespace
Codebelt.Bootstrapper.Console
Assembly
Codebelt.Bootstrapper.Console.dll

Provides the base class of a conventional based Startup class for a console application.

public abstract class ConsoleStartup : StartupRoot
Inheritance
ConsoleStartup
Inherited Members

Constructors

ConsoleStartup(IConfiguration, IHostEnvironment)

Initializes a new instance of the ConsoleStartup class.

protected ConsoleStartup(IConfiguration configuration, IHostEnvironment environment)

Parameters

configuration IConfiguration

The dependency injected IConfiguration.

environment IHostEnvironment

The dependency injected IHostEnvironment.

Methods

ConfigureConsole(IServiceProvider)

Provides access to previously registered services.

public virtual void ConfigureConsole(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The IServiceProvider to retrieve services from.

RunAsync(IServiceProvider, CancellationToken)

A convenient method for executing fire-and-forget code.

public abstract Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken)

Parameters

serviceProvider IServiceProvider

The IServiceProvider to retrieve services from.

cancellationToken CancellationToken

Indicates that the run has been aborted.

Returns

Task

See Also