Skip to content

Installation

Install AlmightyShogun.RemoteCommands in the application that should listen for remote command payloads and dispatch them to typed command handlers. The package targets net10.0 and uses dependency injection for the listener and discovered commands.

sh
dotnet add package AlmightyShogun.RemoteCommands

Dependencies

  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.8 — provides service registration APIs.
  • AlmightyShogun.Logging project reference — provides logging behavior used by the listener.
  • AlmightyShogun.Utils project reference — provides assembly scanning and inherited-type registration helpers.

Startup Registration

Register the listener services, then scan the assemblies that contain remote command classes. Resolve IRemoteCommandHandler from dependency injection when the application is ready to start or stop the listener.

WARNING

Requires a RemoteServer section in application configuration, usually from appsettings.json.

csharp
using AlmightyShogun.RemoteCommands;

builder.Services
    .AddRemoteCommands(builder.Configuration)
    .RegisterRemoteCommands(typeof(Program).Assembly);

All packages are released under the MIT License.