Class CommandDescription
- Namespace
- BSGameLib.Chat
- Assembly
- BSGameLib.Chat.dll
A registered command as a game can show or complete it: what it is called and typed as, what it takes, and for a group, the commands under it. Read from the engine with DescribeCommands().
public sealed record CommandDescription : IEquatable<CommandDescription>
- Inheritance
-
CommandDescription
- Implements
- Inherited Members
Constructors
CommandDescription(string, IReadOnlyList<string>, string, Type, IReadOnlyList<ICommandParameter>, IReadOnlyList<CommandDescription>, bool)
A registered command as a game can show or complete it: what it is called and typed as, what it takes, and for a group, the commands under it. Read from the engine with DescribeCommands().
public CommandDescription(string Name, IReadOnlyList<string> Keywords, string HelpText, Type CommandType, IReadOnlyList<ICommandParameter> Parameters, IReadOnlyList<CommandDescription> Commands, bool IsDefault)
Parameters
NamestringIts name, as registered.
KeywordsIReadOnlyList<string>What is typed for it: the first is its own, the rest shortenings.
HelpTextstringWhat it does, when it says.
CommandTypeTypeThe class behind it, for a game to ask what it needs before showing it; null for one built in code.
ParametersIReadOnlyList<ICommandParameter>What it takes, in order.
CommandsIReadOnlyList<CommandDescription>For a group, the commands under it; empty otherwise.
IsDefaultboolRun when its group is typed with nothing after it.
Properties
CommandType
The class behind it, for a game to ask what it needs before showing it; null for one built in code.
public Type CommandType { get; init; }
Property Value
Commands
For a group, the commands under it; empty otherwise.
public IReadOnlyList<CommandDescription> Commands { get; init; }
Property Value
HelpText
What it does, when it says.
public string HelpText { get; init; }
Property Value
IsDefault
Run when its group is typed with nothing after it.
public bool IsDefault { get; init; }
Property Value
IsGroup
Whether it is a group of commands, typed with one of them after it.
public bool IsGroup { get; }
Property Value
Keywords
What is typed for it: the first is its own, the rest shortenings.
public IReadOnlyList<string> Keywords { get; init; }
Property Value
Name
Its name, as registered.
public string Name { get; init; }
Property Value
Parameters
What it takes, in order.
public IReadOnlyList<ICommandParameter> Parameters { get; init; }