Struct PluginCommand
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
One invocation of a plugin command.
public readonly record struct PluginCommand : IEquatable<PluginCommand>
- Implements
- Inherited Members
Constructors
PluginCommand(string, string, string)
One invocation of a plugin command.
public PluginCommand(string Verb, string Arguments, string RawText)
Parameters
VerbstringThe command word the player typed, without its leading slash.
ArgumentsstringEverything after the verb, as typed.
RawTextstringThe whole line as the player typed it.
Properties
Arguments
Everything after the verb, as typed.
public string Arguments { get; init; }
Property Value
RawText
The whole line as the player typed it.
public string RawText { get; init; }
Property Value
Verb
The command word the player typed, without its leading slash.
public string Verb { get; init; }
Property Value
Methods
ParseArguments()
Parses shell-like arguments, preserving quoted multi-word values.
public IReadOnlyList<string> ParseArguments()
Returns
- IReadOnlyList<string>
The arguments in order; empty when there are none.
Exceptions
- FormatException
A quote is opened and never closed.