Class CommandLineArgs
Allows to parse command line arguments and get argument values as different types. Example of the supported command line arguments: -r=download Url="http://localhost/wxWidgets.7z" Path="e:/file.7z"
public class CommandLineArgs
- Inheritance
-
CommandLineArgs
Remarks
Argument value can be omitted. Html double quote special code can be used in the command line.
Properties
- Default
Gets or sets default CommandLineArgs instance.
Methods
- AsBool(string, bool)
Gets command line argument as boolean.
- AsDouble(string, double)
Gets command line argument as double.
- AsLong(string, long)
Gets command line argument as long.
- AsSemicolonArray(string)
Gets command line argument as string and splits it to the array of strings. Semicolon is used as the separator of the items.
- AsString(string, string?)
Gets command line argument as string.
- HasArgument(string)
Gets whether argument with the specified name exists in the command line.
- OnError(Exception)
Raised on error. Calls Error event.
- Parse(bool)
Parses command line arguments from GetCommandLineArgs().
- Parse(string[])
Parses command line arguments.
- ParseAndGetBool(string)
Parses command line args of the application and gets value of the argument specified by the name.
- ParseAndGetIsDark()
Parses command line args of the application and gets "-IsDark" argument value.
- ParseDefaults(string)
Parses command line defaults.
- ReplaceHtmlChars(string)
Replaces special html characters. By default only double quotes are replaced.
- Reset()
Resets parsed command line arguments as if no arguments were specified.
- ToString()
Returns a string that represents the current object.
Events
- Error
Occurs when exception is raised.