-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilters.cs
More file actions
67 lines (54 loc) · 1.09 KB
/
Copy pathFilters.cs
File metadata and controls
67 lines (54 loc) · 1.09 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
namespace IconCMO
{
public class IconFilter
{
private string[] _id = null;
private int? _startAt = null;
private int? _limit = null;
public IconFilter(string[] id, int startAt, int limit)
{
_id = id;
_startAt = startAt;
_limit = limit;
}
public IconFilter(string[] id)
{
_id = id;
}
public IconFilter(int startAt, int limit)
{
_startAt = startAt;
_limit = limit;
}
public string[] Id
{
get { return _id; }
set { _id = value; }
}
public int? StartAt
{
get { return _startAt; }
set { _startAt = value; }
}
public int? Limit
{
get { return _limit; }
set { _limit = value; }
}
public string GetFilterXML()
{
string filter = string.Empty;
filter = "<Filters>";
if (_id != null)
foreach (String id in _id)
filter += "<id>" + id.ToString() + "</id>";
if (_startAt != null)
filter += "<startAt>" + _startAt.ToString() + "</startAt>";
if (_limit != null)
filter += "<limit>" + _limit.ToString() + "</limit>";
filter += "</Filters>";
return filter;
}
}
}