< Summary

Information
Class: RaidLoop.Client.Services.ClientTelemetryService
Assembly: RaidLoop.Client
File(s): /home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Services/ClientTelemetryService.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 29
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
.ctor(...)100%210%
ReportErrorAsync()100%210%

File(s)

/home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Services/ClientTelemetryService.cs

#LineLine coverage
 1using Microsoft.JSInterop;
 2
 3namespace RaidLoop.Client.Services;
 4
 5public sealed class ClientTelemetryService : IClientTelemetryService
 6{
 7    private readonly IJSRuntime _jsRuntime;
 8
 09    public ClientTelemetryService(IJSRuntime jsRuntime)
 10    {
 011        _jsRuntime = jsRuntime;
 012    }
 13
 14    public async ValueTask ReportErrorAsync(string message, object? details = null, CancellationToken cancellationToken 
 15    {
 16        try
 17        {
 018            await _jsRuntime.InvokeVoidAsync(
 019                "RaidLoopTelemetry.reportError",
 020                cancellationToken,
 021                message,
 022                details);
 023        }
 024        catch (Exception ex)
 25        {
 026            Console.Error.WriteLine($"RaidLoop telemetry reporting failed: {ex}");
 027        }
 028    }
 29}