Пример #1
0
 private void AddTaskNode(TaskNode node)
 {
     if (_logicalRoot.GetNumberOfChildren() >= _fanOut)
     {
         _logicalRoot = _logicalRoot.Successor;
     }
     node.Parent = _logicalRoot;
     _logicalRoot.AddChild(node);
     _prev.Successor = node;
     _prev           = node;
 }
Пример #2
0
        private void AddChild(string childId)
        {
            TaskNode childNode = new TaskNode(_groupName, _operatorName, childId, _driverId, false);

            _nodes[childId] = childNode;

            if (_root != null)
            {
                _root.AddChild(childNode);
                childNode.Parent = _root;
            }
        }
Пример #3
0
        private void SetRootNode(string rootId)
        {
            TaskNode rootNode = new TaskNode(_groupName, _operatorName, rootId, _driverId, true);

            _root = rootNode;

            foreach (TaskNode childNode in _nodes.Values)
            {
                rootNode.AddChild(childNode);
                childNode.Parent = rootNode;
            }
        }