-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMachineGroup.cs
More file actions
39 lines (31 loc) · 1.25 KB
/
Copy pathMachineGroup.cs
File metadata and controls
39 lines (31 loc) · 1.25 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
using Newtonsoft.Json.Linq;
namespace KLC_Ex {
public class MachineGroup {
public string GroupId { get; private set; }
public string GroupName { get; private set; }
public string ParentId { get; private set; }
public string OrgId { get; private set; }
public string GroupNameDisplay { get; private set; }
public MachineGroup(JObject child) {
GroupId = child["MachineGroupId"].ToString();
GroupName = child["MachineGroupName"].ToString();
ParentId = child["ParentMachineGroupId"].ToString();
OrgId = child["OrgId"].ToString();
if (GroupName.EndsWith(".root"))
GroupNameDisplay = GroupName.Substring(0, GroupName.LastIndexOf(".root"));
else
GroupNameDisplay = GroupName;
//Attributes
}
public MachineGroup(string id, string name, string parent, string orgid) {
GroupId = id;
GroupName = name;
ParentId = parent;
OrgId = orgid;
if (GroupName.EndsWith(".root"))
GroupNameDisplay = GroupName.Substring(0, GroupName.LastIndexOf(".root"));
else
GroupNameDisplay = GroupName;
}
}
}