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. |
OptionPrefix
The prefix all options must start with
Declaration
public string OptionPrefix { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
AddOption(String)
Adds a new option with the Default
Declaration
public CommandLineArgOptions AddOption(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the option |
Returns
Type | Description |
---|---|
Command |
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. |
name | The name of the option |
System. |
expectedNumberOfArgumentsAfter | The number of arguments expected with this option |
Returns
Type | Description |
---|---|
Command |
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. |
defaultArgumentCount | The default number of arguments expected associated with each option |
Returns
Type | Description |
---|---|
Command |
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. |
prefix | The prefix expected for each option |
Returns
Type | Description |
---|---|
Command |
This CommandLineArgOptions so you can chain configuring the options |