< Summary

Information
Class: NanoRoute.AwsLambda.ApiGatewayV2RouterConfig
Assembly: NanoRoute.AwsLambda.dll
File(s): /home/runner/work/nanoroute/nanoroute/Src/NanoRoute.AwsLambda/Public/ApiGatewayV2RouterConfig.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 45
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
ApiGatewayV2RouterConfig()30

File(s)

/home/runner/work/nanoroute/nanoroute/Src/NanoRoute.AwsLambda/Public/ApiGatewayV2RouterConfig.cs

#LineLine coverage
 1/********************************************************************************
 2* ApiGatewayV2RouterConfig.cs                                                   *
 3*                                                                               *
 4* Author: Denes Solti                                                           *
 5********************************************************************************/
 6namespace NanoRoute.AwsLambda
 7{
 8    using System;
 9
 10    /// <summary>
 11    /// Configuration settings shared by the AWS Lambda router adapters.
 12    /// </summary>
 13    /// <example>
 14    /// <code>
 15    /// builder.ConfigureRouting(config =&gt; config with
 16    /// {
 17    ///     LambdaTimeoutBuffer = TimeSpan.FromSeconds(2)
 18    /// });
 19    /// </code>
 20    /// </example>
 21    public sealed record ApiGatewayV2RouterConfig : RouterConfig
 22    {
 23        /// <summary>
 24        /// Gets or sets the amount of time reserved before the Lambda invocation timeout is reached.
 25        /// </summary>
 26        /// <exception cref="ArgumentOutOfRangeException">Thrown when the assigned value is negative.</exception>
 27        /// <example>
 28        /// <code>
 29        /// builder.ConfigureRouting(config =&gt; config with
 30        /// {
 31        ///     LambdaTimeoutBuffer = TimeSpan.FromSeconds(2)
 32        /// });
 33        /// </code>
 34        /// </example>
 35        public TimeSpan LambdaTimeoutBuffer
 36        {
 37            get;
 38            init
 139            {
 140                ArgumentOutOfRangeException.ThrowIfLessThan(value, TimeSpan.Zero);
 141                field = value;
 142            }
 143        } = TimeSpan.FromSeconds(1);
 44    }
 45}