Class CommandParser
Inheritance
CommandParser
Assembly: Petabridge.Cmd.Common.dll
Syntax
public class CommandParser
Constructors
CommandParser(CommandPalette)
Declaration
public CommandParser(CommandPalette palette)
Parameters
Fields
HelpCommand
Declaration
public const string HelpCommand = "help"
Field Value
UnknownCommand
Declaration
public const string UnknownCommand = "unknown"
Field Value
Properties
Palette
The set of commands supported by this parser.
Declaration
public CommandPalette Palette { get; }
Property Value
Validator
The validator for this parser.
Declaration
public CommandValidator Validator { get; }
Property Value
Methods
Parse(string)
Parses a full command-line argument into its resultant parts.
Declaration
public ParseResult Parse(string commandLine)
Parameters
Type |
Name |
Description |
string |
commandLine |
The commandline to tokenize.
|
Returns
Parse(string[])
Declaration
public ParseResult Parse(string[] args)
Parameters
Type |
Name |
Description |
string[] |
args |
Tokenized commandline arguments
|
Returns