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 behaviour/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.
May be left as null . More...
|
|
readonly OptionFlags | Flags |
| Binary flags used to toggle some special behaviour 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...
|
|
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 behaviour/actions.
◆ Option()
NibblePoker.Library.Arguments.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 behaviour and conditions during the parsing process. |
- Exceptions
-
- See also
- NibblePoker.Library.Arguments.OptionFlags
◆ AllowsVerbsAfter()
bool NibblePoker.Library.Arguments.Option.AllowsVerbsAfter |
( |
| ) |
|
|
inline |
◆ CanHaveMultipleValue()
bool NibblePoker.Library.Arguments.Option.CanHaveMultipleValue |
( |
| ) |
|
|
inline |
◆ CanHaveValue()
bool NibblePoker.Library.Arguments.Option.CanHaveValue |
( |
| ) |
|
|
inline |
Checks if the Option was given the OptionFlags.HasValue flag in its constructor.
- Returns
true
if the flag was given, false
otherwise.
◆ Clear()
void NibblePoker.Library.Arguments.Option.Clear |
( |
| ) |
|
|
inline |
◆ GetFullName()
string NibblePoker.Library.Arguments.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()
bool NibblePoker.Library.Arguments.Option.HasName |
( |
| ) |
|
|
inline |
Checks if the Option has a name string.
- Returns
true
if it has a name string, false
otherwise.
◆ HasToken()
bool NibblePoker.Library.Arguments.Option.HasToken |
( |
| ) |
|
|
inline |
Checks if the Option has a token character.
- Returns
true
if it has a token character, false
otherwise.
◆ HasValue()
bool NibblePoker.Library.Arguments.Option.HasValue |
( |
| ) |
|
|
inline |
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.
◆ IsDefault()
bool NibblePoker.Library.Arguments.Option.IsDefault |
( |
| ) |
|
|
inline |
Checks if the Option was given the OptionFlags.Default flag in its constructor.
- Returns
true
if the flag was given, false
otherwise.
◆ IsHidden()
bool NibblePoker.Library.Arguments.Option.IsHidden |
( |
| ) |
|
|
inline |
Checks if the Option was given the OptionFlags.Hidden flag in its constructor.
- Returns
true
if the flag was given, false
otherwise.
◆ IsRepeatable()
bool NibblePoker.Library.Arguments.Option.IsRepeatable |
( |
| ) |
|
|
inline |
◆ IsRequired()
bool NibblePoker.Library.Arguments.Option.IsRequired |
( |
| ) |
|
|
inline |
Checks if the Option was given the OptionFlags.Required flag in its constructor.
- Returns
true
if the flag was given, false
otherwise.
◆ ShouldStopParsing()
bool NibblePoker.Library.Arguments.Option.ShouldStopParsing |
( |
| ) |
|
|
inline |
◆ WasUsed()
bool NibblePoker.Library.Arguments.Option.WasUsed |
( |
| ) |
|
|
inline |
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> NibblePoker.Library.Arguments.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 NibblePoker.Library.Arguments.Option.Description |
Description as shown in the help text.
May be left as null
.
◆ Flags
readonly OptionFlags NibblePoker.Library.Arguments.Option.Flags |
◆ Name
readonly string NibblePoker.Library.Arguments.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
int NibblePoker.Library.Arguments.Option.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 NibblePoker.Library.Arguments.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.
The documentation for this class was generated from the following file:
- /github/workspace/NibblePoker.Library.Arguments/Option.cs