Class CommandSpec
- Namespace
- BSGameLib.Chat
- Assembly
- BSGameLib.Chat.dll
A command as a client completes it: what is typed for it, what it takes, and for a group, the commands under it. Plain data, unlike CommandDescription, so a server can send its players the commands each of them may use.
public sealed record CommandSpec : IEquatable<CommandSpec>
- Inheritance
-
CommandSpec
- Implements
- Inherited Members
Constructors
CommandSpec(IReadOnlyList<string>, IReadOnlyList<ParameterSpec>, IReadOnlyList<CommandSpec>)
A command as a client completes it: what is typed for it, what it takes, and for a group, the commands under it. Plain data, unlike CommandDescription, so a server can send its players the commands each of them may use.
public CommandSpec(IReadOnlyList<string> Keywords, IReadOnlyList<ParameterSpec> Parameters, IReadOnlyList<CommandSpec> Commands)
Parameters
KeywordsIReadOnlyList<string>What is typed for it: the first is the one offered, the rest are also understood.
ParametersIReadOnlyList<ParameterSpec>What it takes, in order.
CommandsIReadOnlyList<CommandSpec>For a group, the commands under it; its default, typed as nothing, left out.
Properties
Commands
For a group, the commands under it; its default, typed as nothing, left out.
public IReadOnlyList<CommandSpec> Commands { get; init; }
Property Value
Keywords
What is typed for it: the first is the one offered, the rest are also understood.
public IReadOnlyList<string> Keywords { get; init; }
Property Value
Parameters
What it takes, in order.
public IReadOnlyList<ParameterSpec> Parameters { get; init; }
Property Value
Methods
From(CommandDescription)
A described command as a client completes it.
public static CommandSpec From(CommandDescription command)
Parameters
commandCommandDescription