Table of Contents

Class CommandArguments

Namespace
Signal.Application.Commands.Parsing
Assembly
Signal.Application.dll

Positional arguments and flags of a command, split with knowledge of which flags are switches.

public sealed record CommandArguments : IEquatable<CommandArguments>
Inheritance
CommandArguments
Implements
Inherited Members

Constructors

CommandArguments(IReadOnlyList<CommandToken>, IReadOnlyDictionary<string, string?>, int)

Positional arguments and flags of a command, split with knowledge of which flags are switches.

public CommandArguments(IReadOnlyList<CommandToken> Positional, IReadOnlyDictionary<string, string?> Flags, int LastFlagStart)

Parameters

Positional IReadOnlyList<CommandToken>

Positional tokens in order.

Flags IReadOnlyDictionary<string, string>

Flag values by name (case-insensitive); null for flags without a value.

LastFlagStart int

Offset of the last flag token, or -1 if there is none.

Properties

Flags

Flag values by name (case-insensitive); null for flags without a value.

public IReadOnlyDictionary<string, string?> Flags { get; init; }

Property Value

IReadOnlyDictionary<string, string>

LastFlagStart

Offset of the last flag token, or -1 if there is none.

public int LastFlagStart { get; init; }

Property Value

int

Positional

Positional tokens in order.

public IReadOnlyList<CommandToken> Positional { get; init; }

Property Value

IReadOnlyList<CommandToken>