CommandContext Class

Represents a command context.
public sealed class CommandContext

Constructors

Properties

IReadOnlyList<string> Arguments
Gets all the arguments that were passed to the application.
object Data
Gets the data that was passed to the command during registration (if any).
string Name
Gets the name of the command.
IRemainingArguments Remaining
Gets the remaining arguments.

Extension Methods

T And<CommandContext>(Action<CommandContext>)
Performs the specified action on the given object and then returns the object. Useful for fluent testing patterns where additional assertions or operations are chained together in a readable manner.