Table of Contents

Class CommandParameterInfo

Namespace
SampSharp.Entities.SAMP.Commands
Assembly
SampSharp.OpenMp.Entities.Commands.dll

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

name string
parser ICommandParameterParser
isRequired bool
defaultValue object
parameterIndex int

Properties

DefaultValue

Gets the default value if the parameter is optional and not provided.

public object? DefaultValue { get; }

Property Value

object

IsRequired

Gets whether this parameter is required.

public bool IsRequired { get; }

Property Value

bool

Name

Gets the name of the parameter.

public string Name { get; }

Property Value

string

ParameterIndex

Gets the index of this parameter in the method signature (for positional lookup).

public int ParameterIndex { get; }

Property Value

int

Parser

Gets the parser used to parse this parameter from user input.

public ICommandParameterParser Parser { get; }

Property Value

ICommandParameterParser