Class ConsoleParameter
- Namespace
- Elegy.ConsoleSystem.Commands.Helpers
- Assembly
- Elegy.ConsoleSystem.dll
Essentially a dictionary of console command arguments, with their respective parsing handlers.
public static void Test( float a, int b, int c = 10 )
would create:
( "a", FloatHelper ),
( "b", IntHelper ),
( "c", IntHelper, 10 )
public class ConsoleParameter
- Inheritance
-
ConsoleParameter
- Inherited Members
Constructors
ConsoleParameter(IConsoleArgumentHelper, ParameterInfo)
Creates a ConsoleParameter from reflection metadata.
public ConsoleParameter(IConsoleArgumentHelper helper, ParameterInfo info)
Parameters
helper
IConsoleArgumentHelperinfo
ParameterInfo
Properties
ArgumentHelper
The argument helper.
public IConsoleArgumentHelper ArgumentHelper { get; }
Property Value
DefaultValue
The default value, if any.
public object? DefaultValue { get; }
Property Value
Id
The order of the parameter. Must match the order of the parameter in the method it came from.
public int Id { get; }
Property Value
Name
Name of the parametre.
public string Name { get; }