Class CommandParameterInfo
Represents information about a command parameter that will be parsed from user input.
public class CommandParameterInfo
- Inheritance
-
CommandParameterInfo
- Inherited Members
Constructors
CommandParameterInfo(string, ICommandParameterParser, bool, object?, int)
Initializes a new instance.
public CommandParameterInfo(string name, ICommandParameterParser parser, bool isRequired, object? defaultValue, int parameterIndex)
Parameters
namestringparserICommandParameterParserisRequiredbooldefaultValueobjectparameterIndexint
Properties
DefaultValue
Gets the default value if the parameter is optional and not provided.
public object? DefaultValue { get; }
Property Value
IsRequired
Gets whether this parameter is required.
public bool IsRequired { get; }
Property Value
Name
Gets the name of the parameter.
public string Name { get; }
Property Value
ParameterIndex
Gets the index of this parameter in the method signature (for positional lookup).
public int ParameterIndex { get; }
Property Value
Parser
Gets the parser used to parse this parameter from user input.
public ICommandParameterParser Parser { get; }