forked from ThatRendle/Simple.Data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderByClause.cs
More file actions
29 lines (25 loc) · 941 Bytes
/
OrderByClause.cs
File metadata and controls
29 lines (25 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace Simple.Data
{
/// <summary>
/// Represents the ordering clause of a <see cref="SimpleQuery"/>.
/// There may be zero, one or multiple instances of this type in <see cref="SimpleQuery.Clauses"/>; the order in that list should be treated as significant.
/// </summary>
public class OrderByClause : SimpleQueryClauseBase
{
private readonly ObjectReference _reference;
private readonly OrderByDirection _direction;
public OrderByClause(ObjectReference reference, OrderByDirection? direction = null)
{
_reference = reference;
_direction = direction.HasValue ? direction.Value : OrderByDirection.Ascending;
}
public OrderByDirection Direction
{
get { return _direction; }
}
public ObjectReference Reference
{
get { return _reference; }
}
}
}