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
configurationIConfigurationThe dependency injected IConfiguration.
environmentIHostEnvironmentThe dependency injected IHostEnvironment.
Methods
ConfigureConsole(IServiceProvider)
Provides access to previously registered services.
public virtual void ConfigureConsole(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe 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
serviceProviderIServiceProviderThe IServiceProvider to retrieve services from.
cancellationTokenCancellationTokenIndicates that the run has been aborted.