Class CommandLineArgOptions
Details the options expected for command line arguments
Inherited Members
Namespace: LemonEdge.Utils
Assembly: LemonEdge.Utils.dll
Syntax
public class CommandLineArgOptions
Constructors
CommandLineArgOptions()
Declaration
public CommandLineArgOptions()
Properties
DefaultArgumentCount
The default argument count expected for each option
Declaration
public short DefaultArgumentCount { get; }
Property Value
| Type | Description |
|---|---|
| short |
OptionPrefix
The prefix all options must start with
Declaration
public string OptionPrefix { get; }
Property Value
| Type | Description |
|---|---|
| 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 |
|---|---|---|
| string | name | The name of the option |
Returns
| Type | Description |
|---|---|
| CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |
AddOption(string, short)
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 |
|---|---|---|
| string | name | The name of the option |
| short | expectedNumberOfArgumentsAfter | The number of arguments expected with this option |
Returns
| Type | Description |
|---|---|
| CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |
SetDefaultArgumentCount(short)
Sets the default number of arguments expected associated with each option
Declaration
public CommandLineArgOptions SetDefaultArgumentCount(short defaultArgumentCount)
Parameters
| Type | Name | Description |
|---|---|---|
| short | 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 |
|---|---|---|
| string | prefix | The prefix expected for each option |
Returns
| Type | Description |
|---|---|
| CommandLineArgOptions | This CommandLineArgOptions so you can chain configuring the options |