Class CommandParser
- Namespace
- TechnologySolutions.Rfid.AsciiProtocol
- Assembly
- TechnologySolutions.Rfid.AsciiProtocol.Core.dll
Provides operations for commands
public static class CommandParser
- Inheritance
-
CommandParser
- Inherited Members
Properties
AvailableCommands
Gets the list of commands defined in this library
public static IEnumerable<IAsciiCommand> AvailableCommands { get; }
Property Value
Methods
ParseCommandLine(string)
Parses commandLine into an IAsciiCommand instance. Returns null if the command is not recognised
public static IAsciiCommand ParseCommandLine(string commandLine)
Parameters
commandLine
stringThe command
Returns
- IAsciiCommand
A command instance with the parameters parsed from the command line or null if the command was not recognised
TryParseCommandLine(out IAsciiCommand, string)
Attempts to parse commandLine and output as result. Returns a list of validation errors if any
public static IEnumerable<string> TryParseCommandLine(out IAsciiCommand result, string commandLine)
Parameters
result
IAsciiCommandThe command identified from the command line
commandLine
stringthe command line to parse
Returns
- IEnumerable<string>
Validation messages indicating errors from the command line if any