mirror of
https://github.com/Biarity/Sieve.git
synced 2025-04-07 12:59:36 +02:00
16 lines
345 B
C#
16 lines
345 B
C#
namespace Sieve.Models
|
|
{
|
|
public class SortTerm : ISortTerm
|
|
{
|
|
private readonly string _sort;
|
|
|
|
public SortTerm(string sort)
|
|
{
|
|
_sort = sort;
|
|
}
|
|
|
|
public string Name => (_sort.StartsWith("-")) ? _sort.Substring(1) : _sort;
|
|
|
|
public bool Descending => _sort.StartsWith("-");
|
|
}
|
|
} |