Skip to content

AddConsoleCommands

Registers the console command runtime services. The method adds ConsoleCommandHandler as the implementation for IConsoleCommandHandler, which is the service application code should resolve when it wants to start the command loop.

Use this method before registering command classes with RegisterConsoleCommands.

Usage

csharp
using AlmightyShogun.ConsoleCommands;

builder.Services.AddConsoleCommands();

Returns

The IServiceCollection instance with the console command handler registered.

Type signature

csharp
public IServiceCollection AddConsoleCommands();

Uses

All packages are released under the MIT License.