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
IConfigurationThe dependency injected IConfiguration.
environment
IHostEnvironmentThe dependency injected IHostEnvironment.
Methods
ConfigureConsole(IServiceProvider)
Provides access to previously registered services.
public virtual void ConfigureConsole(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProviderThe 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
IServiceProviderThe IServiceProvider to retrieve services from.
cancellationToken
CancellationTokenIndicates that the run has been aborted.