Class CommandLineArgOptions
Details the options expected for command line arguments
Inheritance
Inherited Members
Namespace: LemonEdge.Utils
Assembly: Utils.dll
Syntax
public class CommandLineArgOptions
Properties
DefaultArgumentCount
The default argument count expected for each option
Declaration
public short DefaultArgumentCount { get; }
Property Value
Type | Description |
---|---|
System.Int16 |
OptionPrefix
The prefix all options must start with
Declaration
public string OptionPrefix { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddOption(String)
Adds a new option with the DefaultArgumentCount expected as the number of arguments for it
Declaration
public CommandLineArgOptions AddOption(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the option |
Returns
Type | Description |
---|---|
CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |
AddOption(String, Int16)
Adds a new option with the specified expectedNumberOfArgumentsAfter
expected as the number of arguments for it
Declaration
public CommandLineArgOptions AddOption(string name, short expectedNumberOfArgumentsAfter)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the option |
System.Int16 | expectedNumberOfArgumentsAfter | The number of arguments expected with this option |
Returns
Type | Description |
---|---|
CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |
SetDefaultArgumentCount(Int16)
Sets the default number of arguments expected associated with each option
Declaration
public CommandLineArgOptions SetDefaultArgumentCount(short defaultArgumentCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | defaultArgumentCount | The default number of arguments expected associated with each option |
Returns
Type | Description |
---|---|
CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |
SetOptionPrefix(String)
Sets the prefix expected for each option
Declaration
public CommandLineArgOptions SetOptionPrefix(string prefix = "/")
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The prefix expected for each option |
Returns
Type | Description |
---|---|
CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |