-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMappings.cs
50 lines (45 loc) · 1.88 KB
/
Mappings.cs
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Collections.Generic;
namespace ShiftSoftware.ShiftGrid.Core
{
public class Mappings
{
public static Dictionary<string, string> OperatorMapping = new Dictionary<string, string>
{
{ GridFilterOperator.Equals, "=" },
{ GridFilterOperator.NotEquals, "!=" },
{ GridFilterOperator.GreaterThan, ">" },
{ GridFilterOperator.GreaterThanOrEquals, ">=" },
{ GridFilterOperator.LessThan, "<" },
{ GridFilterOperator.LessThanOrEquals, "<=" },
{ GridFilterOperator.Contains, ".Contains" },
{ GridFilterOperator.In, ".Contains" },
{ GridFilterOperator.NotIn, ".Contains" },
{ GridFilterOperator.StartsWith, ".StartsWith" },
{ GridFilterOperator.EndsWith, ".EndsWith" },
};
public static Dictionary<string, string> OperatorValuePrefix = new Dictionary<string, string>
{
{ GridFilterOperator.Contains, "(" },
{ GridFilterOperator.In, "(" },
{ GridFilterOperator.NotIn, "(" },
{ GridFilterOperator.StartsWith, "(" },
{ GridFilterOperator.EndsWith, "(" },
};
public static Dictionary<string, string> OperatorValuePostfix = new Dictionary<string, string>
{
{ GridFilterOperator.Contains, ")" },
{ GridFilterOperator.In, ")" },
{ GridFilterOperator.NotIn, ")" },
{ GridFilterOperator.StartsWith, ")" },
{ GridFilterOperator.EndsWith, ")" },
};
public static Dictionary<string, string> ExpressionPrefix = new Dictionary<string, string>
{
{ GridFilterOperator.NotIn, "!(" },
};
public static Dictionary<string, string> ExpressionPostfix = new Dictionary<string, string>
{
{ GridFilterOperator.NotIn, ")" },
};
}
}