Method AddCommand
AddCommand(Command, Func<CommandContext, bool?>)
Sets the function that will be invoked for a Command. Views should call AddCommand for each command they support.
If AddCommand has already been called for command
f
will
replace the old one.
protected void AddCommand(Command command, Func<CommandContext, bool?> f)
Parameters
command
CommandThe command.
f
Func<CommandContext, bool?>The function.
Remarks
This version of AddCommand is for commands that require CommandContext. Use AddCommand(Command, Func<bool?>) in cases where the command does not require a CommandContext.
AddCommand(Command, Func<bool?>)
Sets the function that will be invoked for a Command. Views should call AddCommand for each command they support.
If AddCommand has already been called for command
f
will
replace the old one.
protected void AddCommand(Command command, Func<bool?> f)
Parameters
Remarks
This version of AddCommand is for commands that do not require a CommandContext. If the command requires context, use AddCommand(Command, Func<CommandContext, bool?>)