Class CmdParser
Parses command line input.
Inherited Members
Namespace: Evergine.Common.Helpers
Assembly: Evergine.Common.dll
Syntax
public class CmdParser
Constructors
CmdParser()
Initializes a new instance of the CmdParser class.
Declaration
public CmdParser()
Properties
ErrorMessage
Gets the error text message.
Declaration
public string ErrorMessage { get; }
Property Value
Type | Description |
---|---|
string |
Methods
AddOption(Option)
Add a new option to the parser.
Declaration
public CmdParser AddOption(CmdParser.Option newOption)
Parameters
Type | Name | Description |
---|---|---|
CmdParser.Option | newOption | Option to add. |
Returns
Type | Description |
---|---|
CmdParser | This instace object. |
Parse(string[])
Parse the argument inside the commandline.
Declaration
public bool Parse(string[] args)
Parameters
Type | Name | Description |
---|---|---|
string[] | args | The argument array. |
Returns
Type | Description |
---|---|
bool | True if the parser was successful. |
ShowHelp(string)
Show the documentation on console.
Declaration
public bool ShowHelp(string msg)
Parameters
Type | Name | Description |
---|---|---|
string | msg | The error message. |
Returns
Type | Description |
---|---|
bool | True whether everything ok. |