public static ICompositeCommandBuilder DefineCompositeCommand(this ICompositeCommandBuilder builder, string name, Action <ICompositeCommandBuilder> action) { var childBuilder = new CompositeCommandBuilder(name); action(childBuilder); return(builder.DefineCommand(childBuilder.Build())); }
public static ICompositeCommandBuilder DefineCommand <TCommand>(this ICompositeCommandBuilder builder, string name) where TCommand : class, ICommand <string[]> => builder.DefineCommand(new CommandDefinition <TCommand, string[]>(name));