private GraphNode GetGraphNode(IFlowNode node) { GraphNode graphNode; nodeList.TryGetValue(node.GetID(), out graphNode); return(graphNode); }
public IEnumerable <IFlowNode> GetNextSteps(IFlowNode node) { GraphNode graphNode = GetGraphNode(node); if (graphNode != null) { return(graphNode.nextNodes.Select((n) => n.node)); } else { throw new System.InvalidOperationException("The node " + node.GetID() + " could not be found in the dpendency graph"); } }
public bool IsNodeValidToInstall(IFlowNode node) { bool validToInstall = true; GraphNode graphNode = GetGraphNode(node); if (graphNode != null) { foreach (var pnode in graphNode.previousNodes) { if (((Node)pnode.node).GetInstallationState() == InstallationState.NotInstalled) { validToInstall = false; break; } } } else { throw new System.InvalidOperationException("The node " + node.GetID() + " could not be found in the dpendency graph"); } return(validToInstall); }