public Node(D3Node node) { d3Node = node; Children = new List<Node>(); Name = node.name; GlobalGUID = node.global_guid; InstanceGUID = node.instance_guid; foreach (D3Node child in node.children) { switch (child.type) { case "Service": Children.Add(new ServiceNode(child)); break; case "Condition": Children.Add(new ConditionNode(child)); break; case "ConditionValue": Children.Add(new ConditionValueNode(child)); break; case "ServiceValue": Children.Add(new SIPResponseNode(child)); break; default: Console.WriteLine("Unkown node type" + child.type); break; } } }
public ConditionValueNode(D3Node child) : base(child) { Values = new List<string>(); Values = child.name.Split().ToList(); }
public SIPResponseNode(D3Node child) : base(child) { Values = new List<string>(); Values = child.value.Split().ToList(); }