< Summary

Information
Class: IceRpc.Internal.NotFoundDispatcher
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Internal/NotFoundDispatcher.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 20
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 3
Total methods: 3
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Instance()100%11100%
DispatchAsync(...)100%11100%
.ctor()100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Internal/NotFoundDispatcher.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace IceRpc.Internal;
 4
 5/// <summary>A trivial dispatcher that always returns an <see cref="OutgoingResponse"/> with
 6/// <see cref="StatusCode.NotFound" />.</summary>
 7internal class NotFoundDispatcher : IDispatcher
 8{
 9    /// <summary>Gets the unique instance of this class.</summary>
 75010    internal static NotFoundDispatcher Instance { get; } = new();
 11
 12    /// <inheritdoc/>
 13    public ValueTask<OutgoingResponse> DispatchAsync(IncomingRequest request, CancellationToken cancellationToken = defa
 4214        new(new OutgoingResponse(request, StatusCode.NotFound));
 15
 316    private NotFoundDispatcher()
 317    {
 18        // Ensures it's a singleton.
 319    }
 20}