public ICommandConfigurator AddCommand <TCommand>(string name) where TCommand : class, ICommand { var command = Commands.AddAndReturn(ConfiguredCommand.FromType <TCommand>(name, false)); return(new CommandConfigurator(command)); }
public ICommandConfigurator AddDelegate <TSettings>(string name, Func <CommandContext, TSettings, int> func) where TSettings : CommandSettings { var command = Commands.AddAndReturn(ConfiguredCommand.FromDelegate <TSettings>( name, (context, settings) => func(context, (TSettings)settings))); return(new CommandConfigurator(command)); }