예제 #1
0
        public static IKernelBuilder AddConsoleSupport(this IKernelBuilder kernelBuilder)
        {
            kernelBuilder.ConfigureServices(x => x.AddScoped <IConsoleService, ConsoleService>());

            kernelBuilder.ConfigureServices(x => x.AddScopedCollectionFor <IConsoleCommand>());

            return(kernelBuilder);
        }
예제 #2
0
        public static IKernelBuilder UseConfig(this IKernelBuilder kernelBuilder, IConfiguration configuration)
        {
            kernelBuilder.ConfigureServices(containerBuilder => containerBuilder.Configure(configuration));

            return(kernelBuilder);
        }