Пример #1
0
 public void AddChildren(SortedList <int, int> sortedJoltages)
 {
     sortedJoltages
     .Where(joltageKvp => joltageKvp.Key - Joltage > 0 && joltageKvp.Key - Joltage < 4)
     .ToList()
     .ForEach(joltageKvp =>
     {
         var joltageNode = new VoltageTreeNode {
             Joltage = joltageKvp.Key
         };
         _children.Add(joltageNode.Joltage, joltageNode);
         joltageNode.AddChildren(sortedJoltages);
     });
 }
Пример #2
0
 public void AddChild(VoltageTreeNode child)
 {
     _children.Add(child.Joltage, child);
 }