Example #1
0
 /// <summary>
 /// Analyze the current node and build the internal path prediction dictionary
 /// </summary>
 private void Analyze(IWorkplanNode currentNode, IConnector resultNode, IDictionary <long, HashSet <IWorkplanNode> > reversedRelations)
 {
     // Try to add the result to this node. if this fails we already visited this node
     // and have a reached a recursion
     if (_workplanAnalysis[currentNode.Id].AddResult(resultNode))
     {
         // Continue recursively
         foreach (var input in reversedRelations[currentNode.Id])
         {
             Analyze(input, resultNode, reversedRelations);
         }
     }
 }
 /// <summary>
 /// Removes a node from the workplan
 /// </summary>
 public bool Remove(IWorkplanNode node)
 {
     return(node is IConnector?_connectors.Remove((IConnector)node) : _steps.Remove((IWorkplanStep)node));
 }