Parameter
A class in Root.Township, Alta.Console.
One parameter of a console Command, built from the method's ParameterInfo.
- Listed in Console, logging and analytics
- Inherits or implements
BasePart
Constructors
| Member | What it is |
|---|---|
Parameter(ParameterInfo parameterInfo, Command command, string description) | Creates a Parameter from parameterInfo, command and description. |
Properties
| Member | What it is |
|---|---|
Command Command { get; } | The command this parameter belongs to. |
object Default { get; } | The default value. If the method's default is null this holds the string "default" instead. |
bool HasDefault { get; } | Whether the parameter has a default value, so it can be left out. |
ParameterInfo ParameterInfo { get; } | Reflection info for the method parameter. |
string ParsingError { get; set; } | Why the last value given for this parameter couldn't be parsed. Shown when a command fails to match. |
Type Type { get; } | The parameter's type. |
Methods
Used in
Members of other types that take, return or hold a Parameter: