Exemple #1
0
        public INodeViewInfo[] GetNodes()
        {
            List<INodeViewInfo> nodeInfoList = new List<INodeViewInfo>();

            foreach (INode node in _nodes)
            {
                NodeViewInfo nodeInfo = new NodeViewInfo();
                nodeInfo.Node = node;

                nodeInfoList.Add(nodeInfo);
            }

            return nodeInfoList.ToArray();
        }
Exemple #2
0
        public INodeViewInfo[] GetNodes()
        {
            List<INodeViewInfo> nodeInfoList = new List<INodeViewInfo>();

            foreach (INode node in _nodes)
            {
                NodeViewInfo nodeInfo = new NodeViewInfo();
                nodeInfo.Node = node;

                nodeInfoList.Add(nodeInfo);
            }

            return nodeInfoList.ToArray();
        }
Exemple #3
0
        public INodeViewInfo[] GetNodes(Func <INodeViewInfo, bool> selector)
        {
            List <INodeViewInfo> nodes = new List <INodeViewInfo>();

            NodeViewInfo focalNodeViewInfo = new NodeViewInfo();

            focalNodeViewInfo.Node        = _currentNode;
            focalNodeViewInfo.IsFocalNode = true;

            if (selector(focalNodeViewInfo))
            {
                nodes.Add(focalNodeViewInfo);
            }

            foreach (IDescriptor descriptor in _currentNode.Descriptors)
            {
                foreach (IDescriptor nodeDescriptor in descriptor.Relationship.Descriptors)
                {
                    if (_currentNode.NodeType is MapNode)
                    {
                        if (!nodeDescriptor.Node.Equals(_currentNode))
                        {
                            NodeViewInfo nodeViewInfo = new NodeViewInfo();
                            nodeViewInfo.Node = nodeDescriptor.Node;

                            if (selector(nodeViewInfo))
                            {
                                nodes.Add(nodeViewInfo);
                            }
                        }
                    }
                    else
                    {
                        if (!nodeDescriptor.Node.Equals(_currentNode))
                        {
                            NodeViewInfo nodeViewInfo = new NodeViewInfo();
                            nodeViewInfo.Node = nodeDescriptor.Node;

                            if (selector(nodeViewInfo))
                            {
                                nodes.Add(nodeViewInfo);
                            }
                        }
                    }
                }
            }

            return(nodes.ToArray());
        }
        public INodeViewInfo[] GetNodes(Func<INodeViewInfo, bool> selector)
        {
            List<INodeViewInfo> nodes = new List<INodeViewInfo>();

            NodeViewInfo focalNodeViewInfo = new NodeViewInfo();
            focalNodeViewInfo.Node = _currentNode;
            focalNodeViewInfo.IsFocalNode = true;

            if (selector(focalNodeViewInfo))
            {
                nodes.Add(focalNodeViewInfo);
            }

            foreach (IDescriptor descriptor in _currentNode.Descriptors)
            {
                foreach (IDescriptor nodeDescriptor in descriptor.Relationship.Descriptors)
                {
                    if (_currentNode.NodeType is MapNode)
                    {
                        if (!nodeDescriptor.Node.Equals(_currentNode))
                        {
                            NodeViewInfo nodeViewInfo = new NodeViewInfo();
                            nodeViewInfo.Node = nodeDescriptor.Node;

                            if (selector(nodeViewInfo))
                            {
                                nodes.Add(nodeViewInfo);
                            }
                        }
                    }
                    else
                    {
                        if (!nodeDescriptor.Node.Equals(_currentNode))
                        {
                            NodeViewInfo nodeViewInfo = new NodeViewInfo();
                            nodeViewInfo.Node = nodeDescriptor.Node;

                            if (selector(nodeViewInfo))
                            {
                                nodes.Add(nodeViewInfo);
                            }
                        }
                    }
                }
            }

            return nodes.ToArray();
        }
Exemple #5
0
        public INodeViewInfo[] GetNodes(Func<INodeViewInfo, bool> selector)
        {
            List<INodeViewInfo> nodeInfoList = new List<INodeViewInfo>();

            foreach (INode node in _nodes)
            {
                NodeViewInfo nodeInfo = new NodeViewInfo();
                nodeInfo.Node = node;

                if (selector(nodeInfo))
                {
                    nodeInfoList.Add(nodeInfo);
                }
            }

            return nodeInfoList.ToArray();
        }
Exemple #6
0
        public INodeViewInfo[] GetNodes(Func<INodeViewInfo, bool> selector)
        {
            List<INodeViewInfo> nodeInfoList = new List<INodeViewInfo>();

            foreach (INode node in _nodes)
            {
                NodeViewInfo nodeInfo = new NodeViewInfo();
                nodeInfo.Node = node;

                if (selector(nodeInfo))
                {
                    nodeInfoList.Add(nodeInfo);
                }
            }

            return nodeInfoList.ToArray();
        }