ReplOptionAttribute
Configures named option metadata for a handler parameter.
- Kind:
Class - Namespace: Repl.Parameters
- Assembly:
Repl.Core - Source: src/Repl.Core/Parameters/Attributes/ReplOptionAttribute.cs
Signature
Section titled “Signature”[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]public sealed class ReplOptionAttribute : AttributeInheritance
Section titled “Inheritance”Properties
Section titled “Properties”Aliases
Section titled “Aliases”Additional option aliases as full tokens (for example: --mode, -m).
public string[] Aliases { get; set; }Returns
Section titled “Returns”Optional arity override. Only an explicit assignment overrides the arity inferred from the parameter shape; when unset, the getter returns the enum default and does not reflect the effective arity — read ArityOverride to distinguish unset from an explicit value. An explicit ExactlyOne or OneOrMore requires a value, so mapping a command fails when a handler parameter also declares a default value, which could never apply. An options-group property’s initializer cannot be detected and is not used under such an arity.
public ReplArity Arity { get; set; }Returns
Section titled “Returns”ArityOverride
Section titled “ArityOverride”Explicit arity override, or null to use the arity inferred from the parameter shape.
public ReplArity? ArityOverride { get; }Returns
Section titled “Returns”ReplArity?
AutomationHidden
Section titled “AutomationHidden”Gets or sets a value indicating whether the option is hidden from programmatic surfaces only.
public bool AutomationHidden { get; set; }Returns
Section titled “Returns”CaseSensitivity
Section titled “CaseSensitivity”Optional case-sensitivity override for this option. Only an explicit assignment overrides the global parsing default; when unset, the getter returns the enum default and does not reflect the effective behavior — read CaseSensitivityOverride to distinguish unset from an explicit value.
public ReplCaseSensitivity CaseSensitivity { get; set; }Returns
Section titled “Returns”CaseSensitivityOverride
Section titled “CaseSensitivityOverride”Explicit case-sensitivity override, or null to inherit the global default.
public ReplCaseSensitivity? CaseSensitivityOverride { get; }Returns
Section titled “Returns”ReplCaseSensitivity?
Hidden
Section titled “Hidden”Gets or sets a value indicating whether the option is hidden from every discovery surface: help, interactive and shell completion including value providers, exported documentation, and generated MCP tool and prompt schemas.
public bool Hidden { get; set; }Returns
Section titled “Returns”HiddenAliases
Section titled “HiddenAliases”Legacy aliases that remain accepted by parsing and binding but are omitted from every
discovery surface. Values are full tokens (for example: --old-mode or -o).
public string[] HiddenAliases { get; set; }Returns
Section titled “Returns”Binding mode for the parameter.
public ReplParameterMode Mode { get; set; }Returns
Section titled “Returns”Canonical option name without prefix.
public string? Name { get; set; }Returns
Section titled “Returns”ReverseAliases
Section titled “ReverseAliases”Reverse aliases as full tokens (for example: --no-verbose).
public string[] ReverseAliases { get; set; }