コード例 #1
0
        private IEnumerable<Node> CheckRelationshipTypeOperator(Node node, GraphQueryType typeTest)
        {
            IEnumerable<Node> stoppingPointNodes = null;

            if (typeTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipType.RelationshipTypeName == typeTest.Name);
            }
            else if (typeTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipType.RelationshipTypeName != typeTest.Name);
            }

            return stoppingPointNodes;
        }
コード例 #2
0
        private IEnumerable<Node> CheckNodeTypeOperator(Node node, GraphQueryType typeTest)
        {
            IEnumerable<Node> stoppingPointNodes = null;

            if (typeTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.Node.NodeType.NodeTypeName == typeTest.Name);
            }
            else if (typeTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.Node.NodeType.NodeTypeName != typeTest.Name);
            }

            return stoppingPointNodes;
        }
コード例 #3
0
        private IEnumerable <Node> CheckDescriptorTypeOperator(Node node, GraphQueryType typeTest)
        {
            IEnumerable <Node> stoppingPointNodes = null;

            if (typeTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorType.DescriptorTypeName == typeTest.Name);
            }
            else if (typeTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorType.DescriptorTypeName != typeTest.Name);
            }

            return(stoppingPointNodes);
        }
コード例 #4
0
        private IEnumerable <Node> CheckRelationshipTypeOperator(Node node, GraphQueryType typeTest)
        {
            IEnumerable <Node> stoppingPointNodes = null;

            if (typeTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipType.RelationshipTypeName == typeTest.Name);
            }
            else if (typeTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipType.RelationshipTypeName != typeTest.Name);
            }

            return(stoppingPointNodes);
        }
コード例 #5
0
        private IEnumerable <Node> CheckNodeTypeOperator(IEnumerable <Node> nodes, GraphQueryType typeTest)
        {
            List <Node> filteredNodes = new List <Node>();

            foreach (Node node in nodes)
            {
                if (typeTest.Operator.Equals("Equals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeType.NodeTypeName == typeTest.Name)
                    {
                        filteredNodes.Add(node);
                    }
                }
                else if (typeTest.Operator.Equals("NotEquals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeType.NodeTypeName != typeTest.Name)
                    {
                        filteredNodes.Add(node);
                    }
                }
            }

            return(filteredNodes);
        }
コード例 #6
0
        private IEnumerable<Node> CheckNodeTypeOperator(IEnumerable<Node> nodes, GraphQueryType typeTest)
        {
            List<Node> filteredNodes = new List<Node>();

            foreach (Node node in nodes)
            {
                if (typeTest.Operator.Equals("Equals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeType.NodeTypeName == typeTest.Name)
                    {
                        filteredNodes.Add(node);
                    }
                }
                else if (typeTest.Operator.Equals("NotEquals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeType.NodeTypeName != typeTest.Name)
                    {
                        filteredNodes.Add(node);
                    }
                }
            }

            return filteredNodes;
        }