/// <summary> /// Use building plugin for razor component modules. /// </summary> /// <param name="modules"></param> /// <returns></returns> public static IModuleHostBuilder UseRazorComponentClientModules(this IModuleHostBuilder modules) { return(modules.ConfigureBuilderServices(services => { services.TryAddTransient <IRazorComponentClientModuleManifestBuilder, DefaultRazorComponentClientModuleManifestBuilder>(); }).UsePlugin <RazorComponentClientModulePlugin>().AddModule <RazorComponentClientCoreModule>()); }
/// <summary> /// Use building plugin for graphql modules. /// </summary> /// <param name="modules"></param> /// <returns></returns> public static IModuleHostBuilder UseGraphQLServerModules(this IModuleHostBuilder modules) { return(modules.ConfigureBuilderServices(services => { services.TryAddTransient <IGraphQLServerModuleManifestBuilder, DefaultGraphQLServerModuleManifestBuilder>(); }).UsePlugin <GraphQLServerModulePlugin>().AddModule <GraphqlServerCoreModule>()); }
public static IModuleHostBuilder AddIdentityServerModule(this IModuleHostBuilder builder, Action <IdentityServerModuleStartupOption, IServiceProvider>?configureStartupOptions = null, Action <IdentityServerModuleOption, IServiceProvider>?configureOptions = null) { builder.AddModule <IdentityServerModule>(); if (configureStartupOptions is not null) { builder.ConfigureBuilderServices(services => { services.AddOptions <IdentityServerModuleStartupOption>().Configure(configureStartupOptions); }); } if (configureOptions is not null) { builder.ConfigureServices(services => { services.AddOptions <IdentityServerModuleOption>().Configure(configureOptions); }); } return(builder); }
/// <summary> /// Configure builder options. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="builder"></param> /// <param name="configureOptions"></param> /// <returns></returns> public static IModuleHostBuilder ConfigureBuilderOptions <T>(this IModuleHostBuilder builder, Action <T, IServiceProvider> configureOptions) where T : class => builder.ConfigureBuilderServices(services => services.AddOptions <T>().Configure(configureOptions));