Table of Contents

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

IImmutableList<Argument>

LongNegatives

public ImmutableHashSet<string>? LongNegatives { get; }

Property Value

ImmutableHashSet<string>

LongPositives

public ImmutableHashSet<string>? LongPositives { get; }

Property Value

ImmutableHashSet<string>

NamedVariables

public IImmutableDictionary<string, string>? NamedVariables { get; }

Property Value

IImmutableDictionary<string, string>

Positionals

public IImmutableList<string>? Positionals { get; }

Property Value

IImmutableList<string>

ShortNegatives

public ImmutableHashSet<char>? ShortNegatives { get; }

Property Value

ImmutableHashSet<char>

ShortPositives

public ImmutableHashSet<char>? ShortPositives { get; }

Property Value

ImmutableHashSet<char>

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>