public IExecutableCommandRegistration RegisterExecutableCommand( string primarySelector, IEnumerable <string> aliasSelectors, string name, string helpText, Action <ICommandContext> executeAction) { var command = new GenericExecutableCommand(primarySelector, aliasSelectors, name, helpText, executeAction); registeredCommands.Add(command); return(CreateNewInstance(command)); }
public IExecutableCommandRegistration SetChildToExecutableCommand( string primarySelector, IEnumerable <string> aliasSelectors, string name, string helpText, Action <ICommandContext> executeAction) { var command = new GenericExecutableCommand(primarySelector, aliasSelectors, name, helpText, executeAction); command.Parent = targetCommand; (targetCommand as IInputCommand).NextCommand = command; return(CreateNewInstance(command)); }