< Summary

Information
Class: NanoRoute.AwsLambda.Ensure
Assembly: NanoRoute.AwsLambda.dll
File(s): /home/runner/work/nanoroute/nanoroute/Src/NanoRoute.AwsLambda/Private/Ensure.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
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
NotNull(...)40

File(s)

/home/runner/work/nanoroute/nanoroute/Src/NanoRoute.AwsLambda/Private/Ensure.cs

#LineLine coverage
 1/********************************************************************************
 2* Ensure.cs                                                                     *
 3*                                                                               *
 4* Author: Denes Solti                                                           *
 5********************************************************************************/
 6using System;
 7using System.Runtime.CompilerServices;
 8
 9namespace NanoRoute.AwsLambda
 10{
 11    /// <summary>
 12    /// Guard.
 13    /// </summary>
 14    internal static class Ensure
 15    {
 16        /// <summary>
 17        /// Throws if the parameter is null.
 18        /// </summary>
 19        public static void NotNull(object p, [CallerArgumentExpression(nameof(p))] string? name = null)
 120        {
 121            if (p is null)
 122                throw new ArgumentNullException(name);
 123        }
 24    }
 25}

Methods/Properties

NotNull(object, string)