< Summary - Kestrun — Combined Coverage

Information
Class: KestrunRuntimeApiAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/KestrunRouteAttribute.cs
Tag: Kestrun/Kestrun@0d738bf294e6281b936d031e1979d928007495ff
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 24
Line coverage: 100%
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 12/12/2025 - 17:27:19 Line coverage: 100% (4/4) Total lines: 24 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_Contexts()100%11100%
get_SafeForUntrusted()100%11100%
get_Notes()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/KestrunRouteAttribute.cs

#LineLine coverage
 1/// <summary>
 2/// Attribute to specify runtime API context and notes for Kestrun routes or schedules.
 3/// </summary>
 4/// <remarks>
 5/// Initializes a new instance of the <see cref="KestrunRuntimeApiAttribute"/> class with the specified API contexts.
 6/// </remarks>
 7/// <param name="contexts">The API contexts in which the route or schedule can be executed.</param>
 8[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
 19public sealed class KestrunRuntimeApiAttribute(KestrunApiContext contexts) : KestrunAnnotation
 10{
 11    /// <summary>
 12    /// Gets the API contexts in which the route or schedule can be executed.
 13    /// </summary>
 314    public KestrunApiContext Contexts { get; } = contexts;
 15
 16    /// <summary>
 17    /// Indicates whether the route is safe to be executed by untrusted callers.
 18    /// </summary>
 219    public bool SafeForUntrusted { get; set; }  // optional policy flag
 20    /// <summary>
 21    /// Optional notes or description for the route.
 22    /// </summary>
 223    public string? Notes { get; set; }
 24}