using DeepDrftPublic.Client.Clients; using DeepDrftPublic.Client.Common; using DeepDrftPublic.Client.Services; using DeepDrftPublic.Client.ViewModels; using Microsoft.AspNetCore.Http; namespace DeepDrftPublic.Client; public static class Startup { public static void ConfigureDomainServices(IServiceCollection services) { // Theme Support services.AddScoped(); services.AddScoped(); // Track Client. The HTTP-backed ITrackDataService is used by both WASM and SSR // prerender — both call DeepDrftAPI over the "DeepDrft.API" client. services.AddScoped(); services.AddScoped(); // Release read surface (Phase 9). Same HTTP posture as the track client — both // WASM and SSR prerender call DeepDrftAPI over the "DeepDrft.API" client. services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // Waveform visualizer controls — scoped so the eight slider positions persist across navigation // within a session and reset on a fresh page load (see WaveformVisualizerControlState). services.AddScoped(); } public static void ConfigureApiHttpClient(IServiceCollection services, string baseAddress) { services.AddHttpClient("DeepDrft.API", client => { client.BaseAddress = new Uri(baseAddress); }); } public static void ConfigureContentServices(IServiceCollection services, string contentApiUrl) { services.AddHttpClient("DeepDrft.Content", client => { client.BaseAddress = new Uri(contentApiUrl); }); services.AddScoped(); services.AddScoped(); } }