Files
QuantEngineByItz/src/dotnet/QuantEngine.Web/Client/Program.cs
T
kjh2064 ed21b0874e
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 8s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 14s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Failing after 3m7s
WBS-11 BFF Hardening: Implement auth caching state provider for instant sidebar transitions, forward proxy authentication cookies, and resolve WASM server-side prerendering BaseAddress null exception
2026-07-06 16:40:56 +09:00

28 lines
1.0 KiB
C#

using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.AspNetCore.Components.Authorization;
using QuantEngine.Web.Client.Services;
using QuantEngine.Web.Client.Infrastructure;
using MudBlazor.Services;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// Register LocalStorage for cross-platform session persistence
builder.Services.AddScoped<LocalStorageService>();
// App State Service (RBAC & global state management)
builder.Services.AddScoped<AppStateService>();
// Authentication setup in WebAssembly client
builder.Services.AddAuthorizationCore();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddScoped<AuthenticationStateProvider, CustomAuthenticationStateProvider>();
// MudBlazor Services (CRITICAL: Required for Interactive WebAssembly)
builder.Services.AddMudServices();
// HttpClient register (API-First standard)
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddScoped<ApiClient>();
await builder.Build().RunAsync();