private static void Register(IEndpointRouteBuilder builder, string tenantParam, bool useAreas, bool useAuth, bool useAutoForeignKeys, bool useDiagnostics, bool useWidgets, bool exposeFileSystem, bool exposeClientSettings, bool useFileServices, bool useTenantSwitch) { if (useAutoForeignKeys) { builder.UseAutoForeignKeys(tenantParam, useAreas, useAuth); } if (useDiagnostics) { builder.UseDiagnostics(tenantParam, useAreas, useAuth); } if (useWidgets && !useAreas) { builder.UseWidgets(tenantParam, out _, out _, useAuth); } if (exposeFileSystem && string.IsNullOrEmpty(tenantParam) && !useAreas) { builder.ExposeFileSystem(useAuth); } if (exposeClientSettings && !useAreas) { builder.ExposeClientSettings(tenantParam, useAuth); } if (useFileServices && !useAreas) { builder.UseFileServices(tenantParam, useAuth); } if (useTenantSwitch && string.IsNullOrEmpty(tenantParam) && !useAreas && useAuth) { builder.UseTenantSwitch(); } }