< Summary

Information
Class: NanoRoute.Internals.HandlerRegistration
Assembly: NanoRoute.dll
File(s): /home/runner/work/nanoroute/nanoroute/Src/NanoRoute/Private/HandlerRegistration.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 25
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

Metrics

MethodBlocks covered Blocks not covered
HandlerRegistration(...)30

File(s)

/home/runner/work/nanoroute/nanoroute/Src/NanoRoute/Private/HandlerRegistration.cs

#LineLine coverage
 1/********************************************************************************
 2* HandlerRegistration.cs                                                        *
 3*                                                                               *
 4* Author: Denes Solti                                                           *
 5********************************************************************************/
 6namespace NanoRoute.Internals
 7{
 8    /// <summary>
 9    /// Represents a request <paramref cref="Handler"/> registration.
 10    /// </summary>
 211    internal sealed record HandlerRegistration(RequestHandlerDelegate Handler, string Pattern)
 12    {
 13        /// <summary>
 14        /// Returns true if the registration should match as a prefix.
 15        /// </summary>
 216        public bool IsPrefix { get; } = Pattern.EndsWith
 217        (
 218#if NETSTANDARD2_1_OR_GREATER
 219            '/'
 220#else
 221            "/"
 222#endif
 223        );
 24    }
 25}