コード例 #1
0
        public static ICompositeCommandBuilder DefineCompositeCommand(this ICompositeCommandBuilder builder, string name, Action <ICompositeCommandBuilder> action)
        {
            var childBuilder = new CompositeCommandBuilder(name);

            action(childBuilder);
            return(builder.DefineCommand(childBuilder.Build()));
        }
コード例 #2
0
 public static ICompositeCommandBuilder DefineCommand <TCommand>(this ICompositeCommandBuilder builder, string name) where TCommand : class, ICommand <string[]>
 => builder.DefineCommand(new CommandDefinition <TCommand, string[]>(name));