Table of Contents

Interface ICommandRegistry

Namespace
Signal.Application.Commands
Assembly
Signal.Application.dll

Looks up commands by name or alias.

public interface ICommandRegistry

Properties

Commands

All distinct commands, ordered by name.

IReadOnlyList<CommandDescriptor> Commands { get; }

Property Value

IReadOnlyList<CommandDescriptor>

Methods

GetGroup(string)

Lists the commands of a group (added after 0.4; the default returns none).

IReadOnlyList<CommandDescriptor> GetGroup(string groupNameOrAlias)

Parameters

groupNameOrAlias string

The group name or alias.

Returns

IReadOnlyList<CommandDescriptor>

The group's commands ordered by name, or an empty list if there is no such group.

TryGetCommand(string, out CommandDescriptor?)

Finds a command by name or alias (case sensitivity per CaseSensitive).

bool TryGetCommand(string nameOrAlias, out CommandDescriptor? command)

Parameters

nameOrAlias string

The typed command name. Grouped commands are found by group command (one space), using any combination of group and command aliases.

command CommandDescriptor

The command when the method returns true.

Returns

bool

true if a command matches.