Skip to main content

Module

A class in Root.Township, Alta.Console.

A named group of console commands, with its own commands and submodules. Typing the module name followed by a command runs that command.

Constructors​

MemberWhat it is
Module(object moduleObject, string name, string description)Creates a Module from assembly, parent, name and description.
Module(Assembly assembly, Module parent, string name, string description)Creates a Module from assembly, parent, name and description.

Properties​

MemberWhat it is
Assembly Assembly { get; }The assembly the module's commands came from.
List<Command> Commands { get; }The commands directly in this module.
List<Module> Submodules { get; }Child modules nested under this one.

Methods​

MemberWhat it is
protected override IEnumerable<CommandPart> GetCommandPartInternal(string[] lower, string[] cased, int index, CommandContext context) (iterator)If the word matches an alias, yields this module (when it's the last word) plus matching parts of its submodules and commands.
protected override IEnumerable<CommandSearchResult> GetCommandsInternal(string[] lower, string[] cased, int index, CommandContext context) (iterator)If the input word matches one of the module's aliases, yields the command matches from its submodules and commands.

Used in​

Members of other types that take, return or hold a Module: