Table of Contents

Struct CommandToken

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

A token of the argument text.

public readonly record struct CommandToken : IEquatable<CommandToken>
Implements
Inherited Members

Constructors

CommandToken(string, bool, int)

A token of the argument text.

public CommandToken(string Value, bool IsQuoted, int Start)

Parameters

Value string

The token text, with surrounding quotes removed and escapes resolved.

IsQuoted bool

Whether the token was quoted (quoted tokens are never flags).

Start int

Offset of the token in RawArguments.

Properties

IsEndOfFlags

Whether the token is the end-of-flags marker --.

public bool IsEndOfFlags { get; }

Property Value

bool

IsFlag

Whether the token looks like a flag (--name, unquoted).

public bool IsFlag { get; }

Property Value

bool

IsQuoted

Whether the token was quoted (quoted tokens are never flags).

public bool IsQuoted { get; init; }

Property Value

bool

Start

Offset of the token in RawArguments.

public int Start { get; init; }

Property Value

int

Value

The token text, with surrounding quotes removed and escapes resolved.

public string Value { get; init; }

Property Value

string