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
NibblePoker.Library.Arguments.ArgumentsParser Class Reference

Static class that contains a function related to parsing launch arguments. More...

Static Public Member Functions

static Verb ParseArguments (Verb rootVerb, string[] arguments)
 Parses the given arguments into the given root Verb. More...
 

Detailed Description

Static class that contains a function related to parsing launch arguments.

Member Function Documentation

◆ ParseArguments()

static Verb NibblePoker.Library.Arguments.ArgumentsParser.ParseArguments ( Verb  rootVerb,
string[]  arguments 
)
inlinestatic

Parses the given arguments into the given root Verb.

Parameters
rootVerbThe Verb for which the given arguments should be processed.
argumentsArray of launch arguments to parse.
Returns
The last used Verb when parsing.
Exceptions
Exceptions.ParserExceptionExtended by all the following exceptions.
Exceptions.InvalidArgumentExceptionIf given the token twice, or after reaching the end of options.
Exceptions.NoDefaultOptionFoundExceptionIf no appropriate Option with the OptionFlags.Default flag could be found when needed.
Exceptions.UnknownOptionExceptionIf a given Option couldn't be found when needed.
Exceptions.RepeatedSingularOptionExceptionIf a given Option that could only be used once was used twice.
Exceptions.OptionValueOverflowExceptionIf a given Option that could only hold one value was made to hold more.
Exceptions.NotEnoughArgumentsExceptionIf a given Option needs to have a value, but is the last argument.
Exceptions.OptionHasValueAndMoreShortsExceptionIf a short Option with an expected value isn't given at the end of a short options block.
Exceptions.MissingRequiredOptionExceptionIf an Option with the OptionFlags.Required flag wasn't used after all arguments were parsed.

The documentation for this class was generated from the following file: