Class Option models an option linked to one or more Verb that can be given in launch arguments to pass a value or toggle some behavior/actions.
More...
|
| readonly List< string > | Arguments |
| | List of values given to the Option if it is allowed to have any.
If it isn't allowed to hold any, the list will just be instantiated and empty. More...
|
| |
| readonly? string | Description |
| | Description as shown in the help text.
Will be treated as non-present, or on empty string if left as null. More...
|
| |
| OptionFlags | Flags |
| | Binary flags used to toggle some special behavior and conditions during the parsing process. More...
|
| |
| readonly? string | Name |
| | Name string used when searching for the Option or rendering the help text.
May be left as null to indicate that it has no long name. More...
|
| |
| readonly? char | Token |
| | Token character used when searching for the Option or rendering the help text.
May be left as null to indicate that it has no token. More...
|
| |
| int | Occurrences |
| | Counter used to indicate how many times the Option was used during the parsing process. More...
|
| |
|
| bool | IsDefault [get, set] |
| | Interacts with the OptionFlags.Default flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | CanHaveValue [get, set] |
| | Interacts with the OptionFlags.HasValue flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | IsRepeatable [get, set] |
| | Interacts with the OptionFlags.Repeatable flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | IsHidden [get, set] |
| | Interacts with the OptionFlags.Hidden flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | IsRequired [get, set] |
| | Interacts with the OptionFlags.Required flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | ShouldStopParsing [get, set] |
| | Interacts with the OptionFlags.StopsParsing flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | AllowsVerbsAfter [get, set] |
| | Interacts with the OptionFlags.AllowVerbsAfter flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | ShouldSkipParsingRequirementChecks [get, set] |
| | Interacts with the OptionFlags.SkipsRequiredChecks flag that may have been given in the constructor, or modified through this property. More...
|
| |
| bool | CanHaveMultipleValue [get, set] |
| | Interacts with the OptionFlags.HasValue and OptionFlags.Repeatable flags that may have been given in the constructor, or modified through this property. More...
|
| |
Class Option models an option linked to one or more Verb that can be given in launch arguments to pass a value or toggle some behavior/actions.
◆ Option()
| Option.Option |
( |
char? |
token, |
|
|
string? |
name, |
|
|
string? |
description = "", |
|
|
OptionFlags |
flags = OptionFlags.None |
|
) |
| |
|
inline |
Common constructor for any Option.
- Parameters
-
| token | Nullable token character used when searching for it in a Verb. |
| name | Nullable name string used when searching for it in a Verb. |
| description | Description as shown in the help text. |
| flags | Binary flags used to toggle some special behavior and conditions during the parsing process. |
- Exceptions
-
| Exceptions.MissingOptionIdentifierException | Thrown is a null token and name were given. |
| Exceptions.InvalidFlagsException | Thrown if some invalid OptionFlags combination was given in flags. |
- See also
- NibblePoker.Library.Arguments.OptionFlags
◆ Clear()
Clears any field that may be modified once the launch arguments are parsed.
- See also
- NibblePoker.Library.Arguments.Option.Clear
◆ GetFullName()
| string Option.GetFullName |
( |
bool |
addTicks = false | ) |
|
|
inline |
Retrieve a proper and safe to print name representation for the Option.
- Parameters
-
| addTicks | Adds the - and – prefixes to the output as needed. |
- Returns
- The name in the
t, token or t|token format.
- See also
- NibblePoker.Library.Arguments.HelpText
◆ HasName()
Checks if the Option has a name string.
- Returns
true if it has a name string, false otherwise.
◆ HasToken()
Checks if the Option has a token character.
- Returns
true if it has a token character, false otherwise.
◆ HasValue()
Checks if the Option was used and received a value during the parsing process.
- Returns
true if it has one or more value, false otherwise.
◆ WasUsed()
Checks if the Option was used in the parsed launch arguments.
- Returns
true if it was used at least once, false otherwise.
◆ Arguments
| readonly List<string> Option.Arguments |
List of values given to the Option if it is allowed to have any.
If it isn't allowed to hold any, the list will just be instantiated and empty.
- See also
- NibblePoker.Library.Arguments.OptionFlags.HasValue, NibblePoker.Library.Arguments.OptionFlags.HasMultipleValue
◆ Description
| readonly? string Option.Description |
Description as shown in the help text.
Will be treated as non-present, or on empty string if left as null.
◆ Flags
Binary flags used to toggle some special behavior and conditions during the parsing process.
- See also
- NibblePoker.Library.Arguments.OptionFlags
◆ Name
| readonly? string Option.Name |
Name string used when searching for the Option or rendering the help text.
May be left as null to indicate that it has no long name.
◆ Occurrences
Counter used to indicate how many times the Option was used during the parsing process.
- See also
- NibblePoker.Library.Arguments.OptionFlags.Repeatable
◆ Token
| readonly? char Option.Token |
Token character used when searching for the Option or rendering the help text.
May be left as null to indicate that it has no token.
◆ AllowsVerbsAfter
| bool Option.AllowsVerbsAfter |
|
getset |
◆ CanHaveMultipleValue
| bool Option.CanHaveMultipleValue |
|
getset |
◆ CanHaveValue
Interacts with the OptionFlags.HasValue flag that may have been given in the constructor, or modified through this property.
◆ IsDefault
Interacts with the OptionFlags.Default flag that may have been given in the constructor, or modified through this property.
◆ IsHidden
Interacts with the OptionFlags.Hidden flag that may have been given in the constructor, or modified through this property.
◆ IsRepeatable
Interacts with the OptionFlags.Repeatable flag that may have been given in the constructor, or modified through this property.
◆ IsRequired
Interacts with the OptionFlags.Required flag that may have been given in the constructor, or modified through this property.
◆ ShouldSkipParsingRequirementChecks
| bool Option.ShouldSkipParsingRequirementChecks |
|
getset |
◆ ShouldStopParsing
| bool Option.ShouldStopParsing |
|
getset |
Interacts with the OptionFlags.StopsParsing flag that may have been given in the constructor, or modified through this property.
The documentation for this class was generated from the following file:
- /github/workspace/NibblePoker.Library.Arguments/Option.cs