ParsingOptions
Parsing configuration.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/ParsingOptions.cs
Signature
Section titled “Signature”public sealed class ParsingOptionsInheritance
Section titled “Inheritance”Methods
Section titled “Methods”AddGlobalOption(string, string, string[]?, string?)
Section titled “AddGlobalOption(string, string, string[]?, string?)”Registers a custom global option using a type or constraint name (for example: “int”, “guid”, “bool”, or a registered custom route constraint name).
public void AddGlobalOption(string name, string constraintOrTypeName, string[]? aliases = null, string? defaultValue = null)Parameters
Section titled “Parameters”name(string): Canonical name without prefix (for example: “tenant”).constraintOrTypeName(string): Built-in type name (“string”, “int”, “long”, “bool”, “guid”, “uri”, “date”, “datetime”, “timespan”) or a registered custom route constraint name. Custom constraints resolve tostring.aliases(string[]): Optional aliases. Values without prefix are normalized to--alias.defaultValue(string): Optional default value as string.
AddGlobalOption(string, string, string[]?, string?, string)
Section titled “AddGlobalOption(string, string, string[]?, string?, string)”Registers a custom global option (by type or constraint name) with an explicit help description.
public void AddGlobalOption(string name, string constraintOrTypeName, string[]? aliases, string? defaultValue, string description)Parameters
Section titled “Parameters”name(string): Canonical name without prefix (for example: “tenant”).constraintOrTypeName(string): Built-in type name (“string”, “int”, “long”, “bool”, “guid”, “uri”, “date”, “datetime”, “timespan”) or a registered custom route constraint name. Custom constraints resolve tostring.aliases(string[]): Aliases (passnullfor none). Values without prefix are normalized to--alias.defaultValue(string): Default value as string (passnullfor none).description(string): Description shown in help output.
AddGlobalOption<T>(string, string[]?, T?)
Section titled “AddGlobalOption<T>(string, string[]?, T?)”Registers a custom global option consumed before command routing.
public void AddGlobalOption<T>(string name, string[]? aliases = null, T? defaultValue = default)Type Parameters
Section titled “Type Parameters”T: Declared value type.
Parameters
Section titled “Parameters”name(string): Canonical name without prefix (for example: “tenant”).aliases(string[]): Optional aliases. Values without prefix are normalized to--alias.defaultValue(T): Optional default value metadata. Ignored when T is a collection, which one text default cannot represent.
AddGlobalOption<T>(string, string[]?, T?, string)
Section titled “AddGlobalOption<T>(string, string[]?, T?, string)”Registers a custom global option with an explicit help description.
public void AddGlobalOption<T>(string name, string[]? aliases, T? defaultValue, string description)Type Parameters
Section titled “Type Parameters”T: Declared value type.
Parameters
Section titled “Parameters”name(string): Canonical name without prefix (for example: “tenant”).aliases(string[]): Aliases (passnullfor none). Values without prefix are normalized to--alias.defaultValue(T): Default value metadata (passdefaultfor none). Ignored when T is a collection, which one text default cannot represent.description(string): Description shown in help output.
AddRouteConstraint(string, Func<string, bool>)
Section titled “AddRouteConstraint(string, Func<string, bool>)”Registers a custom route constraint predicate.
public void AddRouteConstraint(string name, Func<string, bool> predicate)Parameters
Section titled “Parameters”name(string): Constraint name.predicate(Func<string, bool>): Predicate used to validate route segment input.
GlobalOption(string)
Section titled “GlobalOption(string)”Selects a registered global option for discovery metadata configuration.
public GlobalOptionBuilder GlobalOption(string name)Parameters
Section titled “Parameters”name(string): Canonical option name, with or without the--prefix.
Returns
Section titled “Returns”GlobalOptionBuilder - A global-option metadata builder.
Properties
Section titled “Properties”AllowResponseFiles
Section titled “AllowResponseFiles”Gets or sets a value indicating whether response files (for example: @args.rsp) are expanded.
public bool AllowResponseFiles { get; set; }Returns
Section titled “Returns”AllowUnknownOptions
Section titled “AllowUnknownOptions”Gets or sets a value indicating whether unknown options are allowed.
public bool AllowUnknownOptions { get; set; }Returns
Section titled “Returns”NumericCulture
Section titled “NumericCulture”Gets or sets the culture mode used for numeric conversions.
public NumericParsingCulture NumericCulture { get; set; }Returns
Section titled “Returns”OptionCaseSensitivity
Section titled “OptionCaseSensitivity”Gets or sets option-name case-sensitivity mode.
public ReplCaseSensitivity OptionCaseSensitivity { get; set; }