Class ParsedCommand
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A parsed command with name and arguments.
public record ParsedCommand : IEquatable<ParsedCommand>
- Inheritance
-
ParsedCommand
- Implements
- Inherited Members
Constructors
ParsedCommand(string, string[], string)
A parsed command with name and arguments.
public ParsedCommand(string Name, string[] Args, string Raw)
Parameters
Properties
Args
public string[] Args { get; init; }
Property Value
- string[]
ArgsAsString
Get all arguments as a single string (useful for commands like ":add person note text here").
public string ArgsAsString { get; }
Property Value
Name
public string Name { get; init; }
Property Value
Raw
public string Raw { get; init; }
Property Value
Methods
GetArg(int)
Get argument at index, or null if not present.
public string? GetArg(int index)
Parameters
indexint
Returns
GetArgsFrom(int)
Get all arguments starting from index as a single string.
public string? GetArgsFrom(int index)
Parameters
indexint
Returns
Parse(string)
Parse a colon-prefixed command string (e.g., ":add self Fixed bug"). Returns null if the input doesn't start with a colon.
public static ParsedCommand? Parse(string input)
Parameters
inputstring