Table of Contents

Interface ICommandRegistry

Namespace
Shard.Modding.SDK.Registry
Assembly
Shard.Modding.SDK.dll

Registry of available commands, keyed by name and aliases. Provided to the service registry so the host registers built-ins and modules contribute their own commands in setup.

public interface ICommandRegistry

Properties

Commands

All distinct registered commands.

IReadOnlyCollection<ICommand> Commands { get; }

Property Value

IReadOnlyCollection<ICommand>

Methods

Register(ICommand)

Register a command under its name and aliases. Throws if the name is already taken.

void Register(ICommand command)

Parameters

command ICommand

TryGet(string, out ICommand?)

Look up a command by name or alias (case-insensitive).

bool TryGet(string nameOrAlias, out ICommand? command)

Parameters

nameOrAlias string
command ICommand

Returns

bool