public static Task RunModule(this IModulesHostBuilder hostBuilder, Type moduleType, Action <IModuleHostingOptions> options = null) { hostBuilder.HostModule(moduleType, options); return(hostBuilder.Build().RunAsync()); }
public static IModulesHostBuilder AddIdentityModule(this IModulesHostBuilder builder, Container container) { builder.HostModule <IdentityModule>(); builder.ConfigureFrameworkServices((ctx, services) => { services.AddTransient <IConfigureContainerFilter <IdentityModule>, IdentityModuleFilters>(); services.AddTransient <IModuleServicesFilter <IdentityModule>, IdentityModuleFilters>(); }); container.RegisterSingleton <IConfigReaderService <ClientConfigModel>, ClientConfigReaderService>(); container.RegisterSingleton <IConfigWriterService <ClientConfigModel>, ClientConfigWriterService>(); container.Register <IDbContextConfigurer <ConfigurationDbContext>, InMemoryConfigurationStoreContextConfigurer>(); return(builder); }