public ICommandConfigurator AddCommand <TCommand>(string name)
        where TCommand : class, ICommand
    {
        var command = Commands.AddAndReturn(ConfiguredCommand.FromType <TCommand>(name, false));

        return(new CommandConfigurator(command));
    }
Exemple #2
0
    public ICommandConfigurator AddCommand <TCommand>(string name)
        where TCommand : class, ICommandLimiter <TSettings>
    {
        var command      = ConfiguredCommand.FromType <TCommand>(name);
        var configurator = new CommandConfigurator(command);

        _command.Children.Add(command);
        return(configurator);
    }
 public void SetDefaultCommand <TDefaultCommand>()
     where TDefaultCommand : class, ICommand
 {
     DefaultCommand = ConfiguredCommand.FromType <TDefaultCommand>(
         CliConstants.DefaultCommandName, isDefaultCommand: true);
 }