Class ParameterInfo
Provides the information of a parameter.
public class ParameterInfo
- Inheritance
-
ParameterInfo
- Inherited Members
Properties
Attributes
Gets a read-only list of attributes that apply to this parameter.
public IReadOnlyList<Attribute> Attributes { get; }
Property Value
Command
Gets the command that associates with this parameter.
public CommandInfo Command { get; }
Property Value
DefaultValue
Gets the default value for this optional parameter if applicable.
public object DefaultValue { get; }
Property Value
IsMultiple
public bool IsMultiple { get; }
Property Value
IsOptional
Gets a value that indicates whether this parameter is optional or not.
public bool IsOptional { get; }
Property Value
IsRemainder
Gets a value that indicates whether this parameter is a remainder parameter or not.
public bool IsRemainder { get; }
Property Value
Name
Gets the name of this parameter.
public string Name { get; }
Property Value
Preconditions
Gets a read-only list of precondition that apply to this parameter.
public IReadOnlyList<ParameterPreconditionAttribute> Preconditions { get; }
Property Value
Summary
Gets the summary of this parameter.
public string Summary { get; }
Property Value
Type
Gets the type of the parameter.
public Type Type { get; }
Property Value
Methods
CheckPreconditionsAsync(ICommandContext, object, IServiceProvider)
public Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, object arg, IServiceProvider services = null)
Parameters
context
ICommandContextarg
objectservices
IServiceProvider
Returns
ParseAsync(ICommandContext, string, IServiceProvider)
public Task<TypeReaderResult> ParseAsync(ICommandContext context, string input, IServiceProvider services = null)
Parameters
context
ICommandContextinput
stringservices
IServiceProvider
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.