/// <summary> /// Adds commands from specified assemblies to the application. /// </summary> public static ICliApplicationBuilder AddCommandsFrom(this ICliApplicationBuilder builder, IReadOnlyList <Assembly> commandAssemblies) { foreach (var commandAssembly in commandAssemblies) { builder.AddCommandsFrom(commandAssembly); } return(builder); }
/// <summary> /// Adds commands from specified assemblies to the application. /// </summary> public static ICliApplicationBuilder AddCommandsFrom(this ICliApplicationBuilder builder, IReadOnlyList <Assembly> commandAssemblies) { builder.GuardNotNull(nameof(builder)); commandAssemblies.GuardNotNull(nameof(commandAssemblies)); foreach (var commandAssembly in commandAssemblies) { builder.AddCommandsFrom(commandAssembly); } return(builder); }
/// <summary> /// Adds commands from calling assembly to the application. /// </summary> public static ICliApplicationBuilder AddCommandsFromThisAssembly(this ICliApplicationBuilder builder) => builder.AddCommandsFrom(Assembly.GetCallingAssembly());
/// <summary> /// Adds commands from calling assembly to the application. /// </summary> public static ICliApplicationBuilder AddCommandsFromThisAssembly(this ICliApplicationBuilder builder) { builder.GuardNotNull(nameof(builder)); return(builder.AddCommandsFrom(Assembly.GetCallingAssembly())); }