OptionSchema Interface
The definition of the command line options.
public interface OptionSchema
- Derived
Methods
Add(string, char?, string, string, Action<Required |
Gets a new OptionSchema object with adding an option that requires an option argument and has the specified short name, the specified Action, the specified argument name, and the specified description. |
Add(string, char?, string, Action<Option>) |
Gets a new OptionSchema object with adding an option that has no argument, the specified short name, the specified Action, and the specified description. |
Add(string, char?, string, string) |
Gets a new OptionSchema object with adding an option that requires an option argument and has the specified short name, the specified argument name, and the specified description. |
Add(string, char?, string) |
Gets a new OptionSchema object with adding an option that has no argument, the specified short name, and the specified description. |
Parse(string[]) |
Gets a new Setting object associated with this OptionSchema, which is the result of parsing the specified command-line options. |
Get |
Gets the description of the command-line options. |
Methods Detail
Add(string, char?, string, string, Action<RequiredArgumentOption>)
Gets a new OptionSchema object with adding an option that requires an option argument and has the specified short name, the specified Action, the specified argument name, and the specified description.
OptionSchema Add(string name, char? shortName, string argumentName, string description, Action<RequiredArgumentOption> action)
Parameters
- name
- string
The name of the option. In general, it includes lowercase letters and hyphens. The name must be unique in this object.
- shortName
- char?
The short name of the option. The short name must be unique in this object.
- argumentName
- string
The name of the option argument.
- description
- string
The description of the option. It can contain line feeds ('\n'), which represents a line separator.
- action
-
Action<Required
Argument >Option
The action to be invoked when the specified option and its argument are found while Parse(string[]) runs.
Returns
The new OptionSchema object.
Add(string, char?, string, Action<Option>)
Gets a new OptionSchema object with adding an option that has no argument, the specified short name, the specified Action, and the specified description.
OptionSchema Add(string name, char? shortName, string description, Action<Option> action)
Parameters
- name
- string
The name of the option. It can include lowercase letters and hyphens. The name must be unique in this object.
- shortName
- char?
The short name of the option. The short name must be unique in this object.
- description
- string
The description of the option. It can contain line feeds ('\n'), which represents a line separator.
The action to be invoked when this option is found while Parse(string[]) runs.
Returns
The new OptionSchema object.
Add(string, char?, string, string)
Gets a new OptionSchema object with adding an option that requires an option argument and has the specified short name, the specified argument name, and the specified description.
OptionSchema Add(string name, char? shortName, string argumentName, string description)
Parameters
- name
- string
The name of the option. In general, it includes lowercase letters and hyphens. The name must be unique in this object.
- shortName
- char?
The short name of the option. The short name must be unique in this object.
- argumentName
- string
The name of the option argument.
- description
- string
The description of the option. It can contain line feeds ('\n'), which represents a line separator.
Returns
The new OptionSchema object.
Add(string, char?, string)
Gets a new OptionSchema object with adding an option that has no argument, the specified short name, and the specified description.
OptionSchema Add(string name, char? shortName, string description)
Parameters
- name
- string
The name of the option. It can include lowercase letters and hyphens. The name must be unique in this object.
- shortName
- char?
The short name of the option. The short name must be unique in this object.
- description
- string
The description of the option. It can contain line feeds ('\n'), which represents a line separator.
Returns
The new OptionSchema object.
Parse(string[])
Gets a new Setting object associated with this OptionSchema, which is the result of parsing the specified command-line options.
Setting Parse(params string[] args)
Parameters
- args
- string[]
The command-line options.
Returns
GetHelpMessage()
Gets the description of the command-line options.
IEnumerable<string> GetHelpMessage()
Returns
The description of this Options.