C# Class cmdR.CommandParsing.CommandParserBase

Show file Open project: theouteredge/cmdR

Public Methods

Method Description
ParseSwitches ( string &cmd ) : string>.IDictionary

Parses out all the switches (/s /switch) contained within the command and places them within a dictionary, it also removes them from the passed in cmd param

Protected Methods

Method Description
GetEscappedToken ( string command, char terminator, char group, string escape, int position, int &nextposition ) : string
GetUnescappedToken ( string command, char terminator, int position, int &nextposition ) : string

gets the next unescaped token from the command, the first token in the command followed by a space, or if we dont have a space then we return the whole command as the token.

Method Details

GetEscappedToken() protected method

protected GetEscappedToken ( string command, char terminator, char group, string escape, int position, int &nextposition ) : string
command string
terminator char
group char
escape string
position int
nextposition int
return string

GetUnescappedToken() protected method

gets the next unescaped token from the command, the first token in the command followed by a space, or if we dont have a space then we return the whole command as the token.
protected GetUnescappedToken ( string command, char terminator, int position, int &nextposition ) : string
command string
terminator char
position int
nextposition int
return string

ParseSwitches() public method

Parses out all the switches (/s /switch) contained within the command and places them within a dictionary, it also removes them from the passed in cmd param
public ParseSwitches ( string &cmd ) : string>.IDictionary
cmd string
return string>.IDictionary