Exemplo n.º 1
0
        public static void UseAppLifetimeModules(this IHostApplicationLifetime appLifetime)
        {
            var modules = IModuleFinder.GetAppLifetimeModules();

            foreach (var module in modules)
            {
                module.OnConfigureAppLifetime(appLifetime);
            }
        }
Exemplo n.º 2
0
        public static void UseModules(this IApplicationBuilder app)
        {
            app.ApplicationServices.GetService <IHostApplicationLifetime>().UseAppLifetimeModules();
            var modules = IModuleFinder.GetMiddlewareModules();

            foreach (var module in modules)
            {
                module.OnConfigure(app);
            }
        }
Exemplo n.º 3
0
        public static void AddModules(this IServiceCollection services, IConfiguration configuration)
        {
            var modules = IModuleFinder.GetModules();

            foreach (var module in modules)
            {
                module.Configuration = configuration;
                module.OnConfigureServices(services);
            }
        }