using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using MudBlazor.Services; using TaikoWebUI.Settings; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddSingleton(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); builder.Services.AddMudServices(); builder.Services.AddSingleton(); builder.Services.Configure(builder.Configuration.GetSection(nameof(WebUiSettings))); builder.Services.AddScoped(); var host = builder.Build(); var gameDataService = host.Services.GetRequiredService(); await gameDataService.InitializeAsync(builder.HostEnvironment.BaseAddress); await host.RunAsync();