< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.TBuilder.EndpointDisablingCompressionExtensions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/TBuilder/EndpointDisablingCompressionExtensions.cs
Tag: Kestrun/Kestrun@5f1d2b981c9d7292c11fd448428c6ab6c811c5de
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 26
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 11/19/2025 - 17:40:50 Line coverage: 100% (3/3) Branch coverage: 100% (4/4) Total lines: 26 Tag: Kestrun/Kestrun@fcf33342333cef0516fe0d0912a86709874fd026 11/19/2025 - 17:40:50 Line coverage: 100% (3/3) Branch coverage: 100% (4/4) Total lines: 26 Tag: Kestrun/Kestrun@fcf33342333cef0516fe0d0912a86709874fd026

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
DisableResponseCompression(...)100%44100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/TBuilder/EndpointDisablingCompressionExtensions.cs

#LineLine coverage
 1namespace Kestrun.TBuilder;
 2
 3/// <summary>
 4/// Extension methods for <see cref="IEndpointConventionBuilder"/> to support disabling compression metadata.
 5/// </summary>
 6public static class EndpointDisablingCompressionExtensions
 7{
 8    /// <summary>
 9    /// Metadata key to indicate that compression should be disabled for this endpoint.
 10    /// Used by compression middleware to skip compression for this endpoint.
 11    /// </summary>
 112    public static readonly object DisableResponseCompressionKey = new();
 13
 14    /// <summary>
 15    ///  Metadata key to indicate that compression should be disabled for this endpoint.
 16    ///  Used by compression middleware to skip compression for this endpoint.
 17    /// </summary>
 18    /// <param name="builder">The endpoint convention builder.</param>
 19    /// <returns>The endpoint convention builder, for fluent chaining.</returns>
 20    public static TBuilder DisableResponseCompression<TBuilder>(this TBuilder builder)
 21        where TBuilder : IEndpointConventionBuilder
 22    {
 423        builder.Add(e => e.Metadata.Add(DisableResponseCompressionKey));
 224        return builder;
 25    }
 26}