CommandContext

Represents a command context.

Represents a command context.

Constructors

public CommandContext(IEnumerable<string> arguments, IRemainingArguments remaining, string name, object data)

Initializes a new instance of the CommandContext class.

Parameters:

arguments (IEnumerable<string>)
All arguments that were passed to the application.
remaining (IRemainingArguments)
The remaining arguments.
name (string)
The command name.
data (object)
The command data.

Properties

Arguments : IReadOnlyList<string>

Gets all the arguments that were passed to the application.

Data : object

Gets the data that was passed to the command during registration (if any).

Name : string

Gets the name of the command.

Remaining : IRemainingArguments

Gets the remaining arguments.