< 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@2d87023b37eb91155071c91dd3d6a2eeb3004705
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 10/13/2025 - 16:52:37 Line coverage: 100% (3/3) Branch coverage: 100% (4/4) Total lines: 26 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e 10/13/2025 - 16:52:37 Line coverage: 100% (3/3) Branch coverage: 100% (4/4) Total lines: 26 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

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}