Skip to content

AddRemoteCommands

Registers the remote command listener services and configuration. The method validates that the RemoteServer configuration section exists, binds it to RemoteServerSettings, and registers RemoteCommandHandler for IRemoteCommandHandler.

Use this method before registering command classes with RegisterRemoteCommands.

Usage

WARNING

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

csharp
using AlmightyShogun.RemoteCommands;

builder.Services.AddRemoteCommands(builder.Configuration);

Parameters

configuration: IConfiguration
Application configuration containing the RemoteServer section.

Returns

The IServiceCollection instance with remote command services configured.

Type signature

csharp
public IServiceCollection AddRemoteCommands(
    IConfiguration configuration
);

Uses

All packages are released under the MIT License.