< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Forms.KrFormPartRule
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Forms/KrFormPartRule.cs
Tag: Kestrun/Kestrun@d9261bd752e45afa789d10bc0c82b7d5724d9589
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 67
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% (12/12) Total lines: 67 Tag: Kestrun/Kestrun@d9261bd752e45afa789d10bc0c82b7d5724d9589

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%11100%
get_Scope()100%11100%
get_NestedRules()100%11100%
get_Description()100%11100%
get_Required()100%11100%
get_AllowMultiple()100%11100%
get_AllowedContentTypes()100%11100%
get_AllowedExtensions()100%11100%
get_MaxBytes()100%11100%
get_DecodeMode()100%11100%
get_DestinationPath()100%11100%
get_StoreToDisk()100%11100%

File(s)

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

#LineLine coverage
 1namespace Kestrun.Forms;
 2
 3/// <summary>
 4/// Defines a rule for a named multipart part.
 5/// </summary>
 6public sealed class KrFormPartRule
 7{
 8    /// <summary>
 9    /// Gets or sets the part name to match.
 10    /// </summary>
 28511    public required string Name { get; set; }
 12
 13    /// <summary>
 14    /// Gets or sets the scope name for nested multipart rules. When not set, the rule applies only at the root.
 15    /// </summary>
 11016    public string? Scope { get; set; }
 17
 18    /// <summary>
 19    /// Gets the nested part rules for multipart/mixed parts.
 20    /// </summary>
 12521    public List<KrFormPartRule> NestedRules { get; } = [];
 22
 23    /// <summary>
 24    /// Gets or sets the description of the part.
 25    /// </summary>
 3726    public string? Description { get; set; }
 27
 28    /// <summary>
 29    /// Gets or sets a value indicating whether the part is required.
 30    /// </summary>
 4331    public bool Required { get; set; }
 32
 33    /// <summary>
 34    /// Gets or sets a value indicating whether multiple parts with the same name are allowed.
 35    /// </summary>
 8736    public bool AllowMultiple { get; set; } = true;
 37
 38    /// <summary>
 39    /// Gets or sets the allowed content types for the part.
 40    /// </summary>
 8841    public List<string> AllowedContentTypes { get; } = [];
 42
 43    /// <summary>
 44    /// Gets or sets the allowed file extensions for file parts.
 45    /// </summary>
 8646    public List<string> AllowedExtensions { get; } = [];
 47
 48    /// <summary>
 49    /// Gets or sets the maximum number of bytes allowed for the part.
 50    /// </summary>
 4051    public long? MaxBytes { get; set; }
 52
 53    /// <summary>
 54    /// Gets or sets the decode mode for the part.
 55    /// </summary>
 3756    public KrPartDecodeMode DecodeMode { get; set; } = KrPartDecodeMode.None;
 57
 58    /// <summary>
 59    /// Gets or sets the destination path override for the part.
 60    /// </summary>
 3761    public string? DestinationPath { get; set; }
 62
 63    /// <summary>
 64    /// Gets or sets a value indicating whether the part should be stored to disk.
 65    /// </summary>
 9766    public bool StoreToDisk { get; set; } = true;
 67}