| | 1 | | using System.Diagnostics; |
| | 2 | |
|
| | 3 | | namespace 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) + "}" + "\\}")] |
| | 11 | | public 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> |
| 8 | 19 | | public SortTerm(string name) |
| | 20 | | { |
| 8 | 21 | | Name = Guard.Against.NullOrWhiteSpace(name); |
| 8 | 22 | | } |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// Gets or sets the original input, based on which current sort term was created. |
| | 26 | | /// </summary> |
| 7 | 27 | | public string? Input { get; set; } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Gets or sets a value indicating whether current sorting |
| | 31 | | /// direction is descending. |
| | 32 | | /// </summary> |
| 16 | 33 | | public bool IsDescending { get; set; } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Gets the name within sorting term. |
| | 37 | | /// </summary> |
| 7 | 38 | | public string Name { get; } |
| | 39 | | } |