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

            return(new CommandConfigurator(command));
        }
示例#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);
        }
示例#3
0
 public void SetDefaultCommand <TDefaultCommand>()
     where TDefaultCommand : class, ICommand
 {
     DefaultCommand = ConfiguredCommand.FromType <TDefaultCommand>(
         Constants.DefaultCommandName, isDefaultCommand: true);
 }