/// <summary> /// Initialize available command line options /// </summary> private static void InitializeComandLineParser() { // // Define the required parameters. // string[] requiredArguments = { "-type" }; CommandLineArgumentParser.DefineRequiredParameters(requiredArguments); // // Define the supported switches. // string[] switches = { "-a" }; CommandLineArgumentParser.DefineSwitches(switches); }
/// <summary> /// Initializes static members of the<see cref="GlobalParameters" /> class. /// </summary> static GlobalParameters() { // Unique parameters that can be used alone string[] uniqueParameters = { "-gui", "-help" }; CommandLineArgumentParser.DefineUniqueParameters(uniqueParameters); // Mandatory parameters of the application decoded from the command line. string[] requiredArguments = { "-rx", "-tx", }; CommandLineArgumentParser.DefineRequiredParameters(requiredArguments); // Optional parameters string[] optionalArguments = { "-baud=9600", "-parity=none", "-stopbit=1", "-data=8", "-output=stdout", "-bytesPerLine=16" }; CommandLineArgumentParser.DefineOptionalParameter(optionalArguments); // Supported switches string[] switches = { "-onlyHex", "-onlyAscii", "-time", "-collapsed", "-ycable" }; CommandLineArgumentParser.DefineSwitches(switches); }