< Summary - ZhEaIsNsAaBn.Libraries coverage (affected: 23 packages)

Information
Line coverage
83%
Covered lines: 5
Uncovered lines: 1
Coverable lines: 6
Total lines: 34
Line coverage: 83.3%
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

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
.ctor(...)100%11100%
Deconstruct(...)100%210%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/UtilitiesPackages/ZhEaIsNsAaBn.Utilities.LayerResponse/Errors/Severity.cs

#LineLine coverage
 1#region Usings
 2using System.Text.Json.Serialization;
 3#endregion
 4
 5namespace ZhEaIsNsAaBn.Utilities;
 6
 7/// <summary>How serious an <see cref="Error"/> is. Compared by <see cref="Value"/>.</summary>
 8public sealed record Severity
 9{
 10    /// <summary>Serious; needs attention.</summary>
 4211    public static readonly Severity High = new( nameof( High ) );
 12
 13    /// <summary>Minor.</summary>
 4214    public static readonly Severity Low = new( nameof( Low ) );
 15
 16    /// <summary>Normal; the default for new errors.</summary>
 4217    public static readonly Severity Medium = new( nameof( Medium ) );
 18
 19    /// <summary>Not set. <see cref="Value"/> is an empty string.</summary>
 4220    public static readonly Severity Unknown = new( string.Empty );
 21
 22
 23    [ JsonConstructor ]
 34424    private Severity( string value ) => Value = value;
 25
 26
 27    /// <summary>The severity name: <c>High</c>, <c>Medium</c>, <c>Low</c>, or empty for <see cref="Unknown"/>.</summary
 28    public string Value { get; init; }
 29
 30
 31    /// <summary>Gets the severity name.</summary>
 32    /// <param name="value">Receives <see cref="Value"/>.</param>
 033    public void Deconstruct( out string value ) => value = Value;
 34}