public static IKernelBuilder AddConsoleSupport(this IKernelBuilder kernelBuilder) { kernelBuilder.ConfigureServices(x => x.AddScoped <IConsoleService, ConsoleService>()); kernelBuilder.ConfigureServices(x => x.AddScopedCollectionFor <IConsoleCommand>()); return(kernelBuilder); }
public static IKernelBuilder UseConfig(this IKernelBuilder kernelBuilder, IConfiguration configuration) { kernelBuilder.ConfigureServices(containerBuilder => containerBuilder.Configure(configuration)); return(kernelBuilder); }