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
PositionalIReadOnlyList<CommandToken>Positional tokens in order.
FlagsIReadOnlyDictionary<string, string>Flag values by name (case-insensitive); null for flags without a value.
LastFlagStartintOffset 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
LastFlagStart
Offset of the last flag token, or -1 if there is none.
public int LastFlagStart { get; init; }
Property Value
Positional
Positional tokens in order.
public IReadOnlyList<CommandToken> Positional { get; init; }