Method InvokeCommand
InvokeCommand(Command, Key?, KeyBinding?)
Invokes the specified command.
public bool? InvokeCommand(Command command, Key? key = null, KeyBinding? keyBinding = null)
Parameters
command
CommandThe command to invoke.
key
KeyThe key that caused the command to be invoked, if any. This will be passed as context with the command.
keyBinding
KeyBinding?The key binding that was bound to the key and caused the invocation, if any. This will be passed as context with the command.
Returns
- bool?
null if no command was found; input proessing should continue. false if the command was invoked and was not handled (or cancelled); input proessing should continue. true if the command was invoked the command was handled (or cancelled); input proessing should stop.
InvokeCommand(Command, CommandContext)
Invokes the specified command.
public bool? InvokeCommand(Command command, CommandContext ctx)
Parameters
command
CommandThe command to invoke.
ctx
CommandContextContext to pass with the invocation.