DotNet-Arguments 2.0.0
A simple and 'to-the-point' library to parse launch arguments in .NET and .NET Core applications.
Loading...
Searching...
No Matches
OptionFlags.cs File Reference

Enumerations

enum  OptionFlags {
  None = 0b0000_0000 , Default = 0b0000_0001 , HasValue = 0b0000_0010 , Repeatable = 0b0000_0100 ,
  HasMultipleValue = HasValue | Repeatable , Hidden = 0b0000_1000 , Required = 0b0001_0000 , StopsParsing = 0b0010_0000 ,
  AllowVerbsAfter = 0b0100_0000 , SkipsRequiredChecks = 0b1000_0000 , HelpLikeOption = StopsParsing | SkipsRequiredChecks , All = None | Default | HasValue | Repeatable | HasMultipleValue | Hidden | AllowVerbsAfter
}
 Binary enum that contains all the flags an Option can use.
These flags can toggle some special behavior and conditions during the parsing process. More...
 

Enumeration Type Documentation

◆ OptionFlags

Binary enum that contains all the flags an Option can use.
These flags can toggle some special behavior and conditions during the parsing process.

Enumerator
None 

Used by default to indicate that the Option has no special features and should act as a single-use toggle.

Default 

Used to indicate that an Option should be a default one, meaning that it can be used without using the short and long argument.
Must be used alongside OptionFlags.HasValue !

See also
NibblePoker.Library.Arguments.Verb.GetRelevantDefaultOption
HasValue 

Used to indicate that an Option can have at least one value.

Repeatable 

Used to indicate that an Option can be used multiple time with or without a value.

HasMultipleValue 

Used to indicate that an Option can have at one or more value(s).

Hidden 

Used to indicate that an Option shouldn't be shown in the help text.

See also
NibblePoker.Library.Arguments.HelpText.GetFullHelpText
Required 

Used to indicate that an Option must be used in the final Verb.
If used alongside OptionFlags.AllowVerbsAfter it must also have been used in any parent Verb.

StopsParsing 

Used to indicate that an Option must stop the parsing process as soon as it has been handled.
This flag is typically reserved for options such as –help or –version.
Ignores any checks related to OptionFlags.Required !

AllowVerbsAfter 

Indicates that an Option will not prevent further Verb from being parsed after it is encountered.
Usage of this flag required some forethought if the Option has the same name as a sub-Verb while using the OptionFlags.Default flag.
In those cases, the Verb will take precedence over the Option unless it is explicitly used with its token or name.
It is recommended to only use it with the OptionFlags.Required flag to force the user into explicitly using the token or name.

SkipsRequiredChecks 

Used to indicate that an Option should skip all verification steps that ensures every Option with the Required were given.
This flag should only be used with the Required one for help text options !

HelpLikeOption 

Used for help text and other simple text printing options that ignore all other options.

All 

Used for tests, do not use in any program !