Table of Contents

Struct ParserRawArgumentParameterMapping

Namespace
Utils.Parser.Runtime
Assembly
Utils.Parser.dll

Describes a single positional mapping from a raw call-site argument slice to a named child-rule parameter seed. Used with generated SetNextRuleParametersFromRawArguments helpers.

public readonly record struct ParserRawArgumentParameterMapping : IEquatable<ParserRawArgumentParameterMapping>
Implements
Inherited Members
Extension Methods

Remarks

Mapping is explicit and requires a caller-supplied delegate. No argument is evaluated automatically. No parameter is bound without an explicit call to the generated helper.

Properties

Index

Gets the zero-based index of the argument slice within the split raw-argument list. When the index is out of range, no seed is set for this mapping and the helper returns false.

public required int Index { get; init; }

Property Value

int

Map

Gets the caller-supplied delegate that converts the raw argument text to an untyped seed value. Must not be null. Exceptions from the delegate propagate to the caller.

public required Func<string, object?> Map { get; init; }

Property Value

Func<string, object>

ParameterName

Gets the child-rule parameter metadata name that will receive the seeded value. Must not be null.

public required string ParameterName { get; init; }

Property Value

string