using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; using ScadaLink.CentralUI.Auth; using ScadaLink.CentralUI.Components.Layout; using ScadaLink.CentralUI.ScriptAnalysis; namespace ScadaLink.CentralUI; public static class EndpointExtensions { /// /// Maps the Central UI endpoints. The caller must provide the root App component type /// from the Host assembly so that blazor.web.js is served correctly. /// public static IEndpointRouteBuilder MapCentralUI(this IEndpointRouteBuilder endpoints) where TApp : Microsoft.AspNetCore.Components.IComponent { endpoints.MapAuthEndpoints(); endpoints.MapScriptAnalysisEndpoints(); endpoints.MapRazorComponents() .AddInteractiveServerRenderMode() .AddAdditionalAssemblies(typeof(MainLayout).Assembly); return endpoints; } }