Exemplo n.º 1
0
        public IEnumerable <NodeId> GetIncomingEdges(NodeId nodeId, HashSet <NodeId> allNodes)
        {
            foreach (var incomingNode in CachedGraph.DirectedGraph.GetIncomingEdges(nodeId))
            {
                if (allNodes == null || allNodes.Contains(incomingNode.OtherNode))
                {
                    yield return(incomingNode.OtherNode);
                }
            }

            if (m_nodesWithObservedInputs.Contains(nodeId))
            {
                foreach (var observedPath in m_fingerprintComputations[nodeId.ToPipId().Value])
                {
                    PipId?pipId = CachedGraph.PipGraph.TryFindProducerPipId(observedPath.Path, VersionDisposition.Latest, null);
                    if (pipId.HasValue)
                    {
                        var newNodeId = pipId.Value.ToNodeId();
                        if (pipId.Value.Value == nodeId.Value)
                        {
                            Console.Error.WriteLine("Pip depends on himself: " + GetPath(observedPath.Path));
                        }
                        else if (allNodes == null || allNodes.Contains(newNodeId))
                        {
                            yield return(newNodeId);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public Pip GetPip(NodeId nodeId)
 {
     return(PipTable.HydratePip(nodeId.ToPipId(), PipQueryContext.ViewerAnalyzer));
 }
Exemplo n.º 3
0
 public PipType GetPipType(NodeId node)
 {
     return(CachedGraph.PipTable.GetPipType(node.ToPipId()));
 }
Exemplo n.º 4
0
        public string GetName(NodeId node)
        {
            var pip = CachedGraph.PipTable.HydratePip(node.ToPipId(), BuildXL.Pips.PipQueryContext.ViewerAnalyzer);

            return(pip.GetDescription(CachedGraph.Context));
        }