< Summary

Information
Class: Fluorite.Strainer.Models.Sorting.Terms.SortTerm
Assembly: Fluorite.Strainer
File(s): /builds/fluorite/strainer/src/Strainer/Models/Sorting/Terms/SortTerm.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 39
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

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_Input()100%11100%
get_IsDescending()100%11100%
get_Name()100%11100%

File(s)

/builds/fluorite/strainer/src/Strainer/Models/Sorting/Terms/SortTerm.cs

#LineLine coverage
 1using System.Diagnostics;
 2
 3namespace Fluorite.Strainer.Models.Sorting.Terms;
 4
 5/// <summary>
 6/// Provides detailed information about sorting expression.
 7/// </summary>
 8[DebuggerDisplay("\\{" +
 9        nameof(Name) + " = " + "{" + nameof(Name) + "}, " +
 10        nameof(IsDescending) + " = " + "{" + nameof(IsDescending) + "}" + "\\}")]
 11public class SortTerm : ISortTerm
 12{
 13    /// <summary>
 14    /// Initializes a new instance of the <see cref="SortTerm"/> class.
 15    /// </summary>
 16    /// <param name="name">
 17    /// The name within sorting term.
 18    /// </param>
 819    public SortTerm(string name)
 20    {
 821        Name = Guard.Against.NullOrWhiteSpace(name);
 822    }
 23
 24    /// <summary>
 25    /// Gets or sets the original input, based on which current sort term was created.
 26    /// </summary>
 727    public string? Input { get; set; }
 28
 29    /// <summary>
 30    /// Gets or sets a value indicating whether current sorting
 31    /// direction is descending.
 32    /// </summary>
 1633    public bool IsDescending { get; set; }
 34
 35    /// <summary>
 36    /// Gets the name within sorting term.
 37    /// </summary>
 738    public string Name { get; }
 39}