< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Forms.KrFormLimits
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Forms/KrFormLimits.cs
Tag: Kestrun/Kestrun@d9261bd752e45afa789d10bc0c82b7d5724d9589
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 62
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 02/05/2026 - 00:28:18 Line coverage: 100% (16/16) Total lines: 62 Tag: Kestrun/Kestrun@d9261bd752e45afa789d10bc0c82b7d5724d9589

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_MaxRequestBodyBytes()100%11100%
get_MaxPartBodyBytes()100%11100%
get_MaxParts()100%11100%
get_MaxHeaderBytesPerPart()100%11100%
get_MaxFieldValueBytes()100%11100%
get_MaxNestingDepth()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
ToString()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Forms/KrFormLimits.cs

#LineLine coverage
 1namespace Kestrun.Forms;
 2
 3/// <summary>
 4/// Defines form parsing limits.
 5/// </summary>
 6public sealed class KrFormLimits
 7{
 8    /// <summary>
 9    /// Gets or sets the maximum allowed request body size in bytes.
 10    /// </summary>
 3311    public long? MaxRequestBodyBytes { get; set; } = 100 * 1024 * 1024;
 12
 13    /// <summary>
 14    /// Gets or sets the maximum allowed part body size in bytes.
 15    /// </summary>
 3116    public long MaxPartBodyBytes { get; set; } = 20 * 1024 * 1024;
 17
 18    /// <summary>
 19    /// Gets or sets the maximum number of parts allowed.
 20    /// </summary>
 3221    public int MaxParts { get; set; } = 1024;
 22
 23    /// <summary>
 24    /// Gets or sets the maximum header bytes per part.
 25    /// </summary>
 3126    public int MaxHeaderBytesPerPart { get; set; } = 16 * 1024;
 27
 28    /// <summary>
 29    /// Gets or sets the maximum field value size in bytes.
 30    /// </summary>
 2731    public long MaxFieldValueBytes { get; set; } = 64 * 1024;
 32
 33    /// <summary>
 34    /// Gets or sets the maximum nesting depth for multipart bodies.
 35    /// </summary>
 1536    public int MaxNestingDepth { get; set; }
 37
 38    /// <summary>
 39    /// Initializes a new instance of the <see cref="KrFormLimits"/> class.
 40    /// </summary>
 3441    public KrFormLimits() { }
 42
 43    /// <summary>
 44    /// Initializes a new instance of the <see cref="KrFormLimits"/> class by copying settings from another instance.
 45    /// </summary>
 46    /// <param name="other"> The instance to copy settings from. </param>
 147    public KrFormLimits(KrFormLimits other)
 48    {
 149        MaxRequestBodyBytes = other.MaxRequestBodyBytes;
 150        MaxPartBodyBytes = other.MaxPartBodyBytes;
 151        MaxParts = other.MaxParts;
 152        MaxHeaderBytesPerPart = other.MaxHeaderBytesPerPart;
 153        MaxFieldValueBytes = other.MaxFieldValueBytes;
 154        MaxNestingDepth = other.MaxNestingDepth;
 155    }
 56
 57    /// <summary>
 58    /// Returns a string representation of the form limits.
 59    /// </summary>
 60    /// <returns></returns>
 161    public override string ToString() => $"MaxRequestBodyBytes={MaxRequestBodyBytes}, MaxPartBodyBytes={MaxPartBodyBytes
 62}