示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 /// <summary>
 /// Adds commands from calling assembly to the application.
 /// </summary>
 public static ICliApplicationBuilder AddCommandsFromThisAssembly(this ICliApplicationBuilder builder) =>
 builder.AddCommandsFrom(Assembly.GetCallingAssembly());
示例#4
0
 /// <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()));
 }