Class ArgumentList
- Namespace
- ReFuel
- Assembly
- ReFuel.Common.dll
A class for parsing command line arguments.
public class ArgumentList : IEnumerable<Argument>, IEnumerable
- Inheritance
-
ArgumentList
- Implements
- Inherited Members
Remarks
The syntax for this parser is as follows: A singular - is stdin. A double dash -- is the stop processing marker. A single dash - followed by letters is a negative short switch (-x). A single plus + followed by letters is a positive short switch (+x). A double dash followed by some letters and dashes is one of the following: * A long positive switch which ends with + (--long-switch+) * A long negative switch which ends with - (--long-switch-) * A named variable which ends with = (--named-variable=)
Properties
Arguments
public IImmutableList<Argument>? Arguments { get; }
Property Value
LongNegatives
public ImmutableHashSet<string>? LongNegatives { get; }
Property Value
LongPositives
public ImmutableHashSet<string>? LongPositives { get; }
Property Value
NamedVariables
public IImmutableDictionary<string, string>? NamedVariables { get; }
Property Value
Positionals
public IImmutableList<string>? Positionals { get; }
Property Value
ShortNegatives
public ImmutableHashSet<char>? ShortNegatives { get; }
Property Value
ShortPositives
public ImmutableHashSet<char>? ShortPositives { get; }
Property Value
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Argument> GetEnumerator()
Returns
- IEnumerator<Argument>
An enumerator that can be used to iterate through the collection.
Parse(ReadOnlySpan<string>)
public void Parse(ReadOnlySpan<string> args)
Parameters
args
ReadOnlySpan<string>