< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Scripting.RouteHandlerBuilderLanguageExtensions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Scripting/RouteHandlerBuilderLanguageExtensions.cs
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 17
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

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
WithLanguage(...)100%210%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Scripting/RouteHandlerBuilderLanguageExtensions.cs

#LineLine coverage
 1namespace Kestrun.Scripting;
 2
 3/// <summary>
 4/// Extension methods for <see cref="RouteHandlerBuilder"/> to support script language metadata.
 5/// </summary>
 6public static class RouteHandlerBuilderLanguageExtensions
 7{
 8    /// <summary>
 9    /// Tags a <see cref="RouteHandlerBuilder"/> with a <see cref="ScriptLanguageAttribute"/> for the specified language
 10    /// </summary>
 11    /// <param name="b">The route handler builder to tag.</param>
 12    /// <param name="lang">The script language to associate with the route handler.</param>
 13    /// <returns>The same <see cref="RouteHandlerBuilder"/> instance for fluent chaining.</returns>
 14    public static RouteHandlerBuilder WithLanguage(
 15             this RouteHandlerBuilder b, ScriptLanguage lang) =>
 016         b.WithMetadata(new ScriptLanguageAttribute(lang));
 17}