Show / Hide Table of Contents

    Class CommandParser

    Parses a space-delimited string into a structured Command object for a specific CommandPalette.

    Inheritance
    System.Object
    CommandParser
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Petabridge.Cmd
    Assembly: cs.temp.dll.dll
    Syntax
    public class CommandParser

    Constructors

    CommandParser(CommandPalette)

    Declaration
    public CommandParser(CommandPalette palette)
    Parameters
    Type Name Description
    CommandPalette palette

    Fields

    HelpCommand

    Declaration
    public const string HelpCommand = "help"
    Field Value
    Type Description
    System.String

    UnknownCommand

    Declaration
    public const string UnknownCommand = "unknown"
    Field Value
    Type Description
    System.String

    Properties

    Palette

    The set of commands supported by this parser.

    Declaration
    public CommandPalette Palette { get; }
    Property Value
    Type Description
    CommandPalette

    Validator

    The validator for this parser.

    Declaration
    public CommandValidator Validator { get; }
    Property Value
    Type Description
    CommandValidator

    Methods

    Parse(String)

    Parses a full command-line argument into its resultant parts.

    Declaration
    public ParseResult Parse(string commandLine)
    Parameters
    Type Name Description
    System.String commandLine

    The commandline to tokenize.

    Returns
    Type Description
    ParseResult

    A ParseResult structure indicating if the object was correctly formed into a valid, recognizable Command belonging to this CommandPalette.

    Parse(String[])

    Parses an incoming string into a Command belonging to Palette.

    Declaration
    public ParseResult Parse(string[] args)
    Parameters
    Type Name Description
    System.String[] args

    Tokenized commandline arguments

    Returns
    Type Description
    ParseResult

    A ParseResult structure indicating if the object was correctly formed into a valid, recognizable Command belonging to this CommandPalette.

    Back to top Generated by DocFX