Removed Immediate.Apis, Added AOT Testing Scripts.

This commit is contained in:
2026-05-05 18:47:11 +05:00
parent d7ff6f112a
commit bcdd543916
27 changed files with 623 additions and 422 deletions
@@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Htmx.ApiDemo.Templates;
namespace Htmx.ApiDemo;
public static partial class RouteMap
{
private static void GetUiDemo(WebApplication app)
=> app.MapGet("/ui-demo", (IHttpContextAccessor contextAccessor) =>
{
var context = contextAccessor.HttpContext
?? throw new InvalidOperationException("HttpContext is not available.");
if (context.User.Identity?.IsAuthenticated == false)
{
context.Response.Redirect("/login");
return;
}
var uiDemoComponent = new UiDemo();
uiDemoComponent.HtmxAwareWriteToBody(
context: context,
title: "UI Demo",
appName: "HtmxApp",
pageTitle: "Htmx UI Demo"
);
});
}