예제 #1
0
        private void RecursiveAddNode(RuntimeGraph.RuntimeGraphNode node, Graph graph, IDictionary <string, string> commonGlobalProperties)
        {
            AddNodeAndDirectChildrenToGraph(node, graph, commonGlobalProperties);

            foreach (var child in node.SortedChildren)
            {
                RecursiveAddNode(child, graph, commonGlobalProperties);
            }
        }
예제 #2
0
        private void AddNodeAndDirectChildrenToGraph(RuntimeGraph.RuntimeGraphNode node, Graph graph, IDictionary <string, string> commonGlobalProperties)
        {
            var msaglNode = GetMsaglNode(node.Project, graph, commonGlobalProperties);

            Node previousMsaglNode = null;

            foreach (var child in node.SortedChildren)
            {
                var currentMsaglNode = GetMsaglNode(child.Project, graph, commonGlobalProperties);

                // ensure left to right ordering
                if (previousMsaglNode != null)
                {
                    graph.LayerConstraints.AddLeftRightConstraint(previousMsaglNode, currentMsaglNode);
                }

                // add edge
                var edge = new Edge(msaglNode, currentMsaglNode, ConnectionToGraph.Connected);
                msaglNode.AddOutEdge(edge);
                edge.LabelText = GetTargetString(child.Project);

                previousMsaglNode = currentMsaglNode;
            }
        }