Sieve/Sieve/Models/SortTerm.cs
2018-05-15 00:34:37 +01:00

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("-");
}
}