< Summary

Information
Class: Program
Assembly: RaidLoop.Client
File(s): /home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Program.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 32
Coverable lines: 32
Total lines: 41
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
<Main>$()100%210%

File(s)

/home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Program.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Components.Web;
 2using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
 3using Microsoft.Extensions.Options;
 4using RaidLoop.Client;
 5using RaidLoop.Client.Configuration;
 6using RaidLoop.Client.Services;
 7
 08var builder = WebAssemblyHostBuilder.CreateDefault(args);
 09builder.RootComponents.Add<App>("#app");
 010builder.RootComponents.Add<HeadOutlet>("head::after");
 11
 012builder.Services.AddLocalization(options => options.ResourcesPath = "Resources");
 013builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
 014builder.Services.Configure<SupabaseOptions>(builder.Configuration.GetSection(SupabaseOptions.SectionName));
 015builder.Services.AddScoped<SupabaseAuthService>();
 016builder.Services.AddScoped<IClientTelemetryService, ClientTelemetryService>();
 017builder.Services.AddScoped<ISupabaseSessionProvider>(sp => sp.GetRequiredService<SupabaseAuthService>());
 018builder.Services.AddScoped<IProfileApiClient>(sp =>
 019{
 020    var options = sp.GetRequiredService<IOptions<SupabaseOptions>>().Value;
 021    return new ProfileApiClient(
 022        new HttpClient
 023        {
 024            BaseAddress = new Uri($"{options.Url.TrimEnd('/')}/functions/v1/")
 025        },
 026        sp.GetRequiredService<ISupabaseSessionProvider>(),
 027        options);
 028});
 029builder.Services.AddScoped<IGameActionApiClient>(sp =>
 030{
 031    var options = sp.GetRequiredService<IOptions<SupabaseOptions>>().Value;
 032    return new GameActionApiClient(
 033        new HttpClient
 034        {
 035            BaseAddress = new Uri($"{options.Url.TrimEnd('/')}/functions/v1/")
 036        },
 037        sp.GetRequiredService<ISupabaseSessionProvider>(),
 038        options);
 039});
 40
 041await builder.Build().RunAsync();

Methods/Properties

<Main>$()