public IContainerCommandRegistration RegisterContainerCommand( string primarySelector, IEnumerable <string> aliasSelectors, string name, string helpText, Func <ICommandContext, IEnumerable <ICommand>, ICommand> getDefaultCommandFunc) { var command = new GenericContainerCommand( primarySelector, aliasSelectors, name, helpText, getDefaultCommandFunc); registeredCommands.Add(command); return(CreateNewInstance(command)); }
public IContainerCommandRegistration AddContainerCommand( string primarySelector, IEnumerable <string> aliasSelectors, string name, string helpText, Func <ICommandContext, IEnumerable <ICommand>, ICommand> getDefaultCommandFunc) { var command = new GenericContainerCommand( primarySelector, aliasSelectors, name, helpText, getDefaultCommandFunc); command.Parent = targetCommand; (targetCommand as IContainerCommandEdit).AddChild(command); return(CreateNewInstance(command)); }