Beispiel #1
0
            protected override void VisitReference(IGraphNode referencer, ObjectReference reference, GraphNodePath targetPath)
            {
                if (ShouldVisitNode(referencer.Content as MemberContent, reference.TargetNode))
                {
                    if (reference.TargetNode != null)
                    {
                        // Prevent re-entrancy in the same object
                        if (VisitedLinks.ContainsKey(reference.TargetNode))
                        {
                            return;
                        }

                        IGraphNode targetNode;
                        if (VisitedLinks.TryGetValue(referencer, out targetNode))
                        {
                            ObjectReference targetReference = null;
                            if (targetNode != null)
                            {
                                targetReference = linker.FindTargetReference(referencer, targetNode, reference);
                            }

                            VisitedLinks.Add(reference.TargetNode, targetReference?.TargetNode);
                        }
                    }
                    base.VisitReference(referencer, reference, targetPath);
                }
            }
Beispiel #2
0
            protected override void VisitReference(IGraphNode referencer, ObjectReference reference, GraphNodePath targetPath)
            {
                if (reference.TargetNode != null)
                {
                    IGraphNode targetNode;
                    if (VisitedLinks.TryGetValue(referencer, out targetNode))
                    {
                        ObjectReference targetReference = null;
                        if (targetNode != null)
                        {
                            targetReference = linker.FindTargetReference(referencer, targetNode, reference);
                        }

                        VisitedLinks.Add(reference.TargetNode, targetReference?.TargetNode);
                    }
                }
                base.VisitReference(referencer, reference, targetPath);
            }