private IEnumerable<Node> CheckDescriptorOperator(Node node, GraphQuerySchema schemaTest)
        {
            IEnumerable<Node> stoppingPointNodes = null;

            if (schemaTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorUid == schemaTest.Id);
            }
            else if (schemaTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorUid != schemaTest.Id);
            }

            return stoppingPointNodes;
        }
        private IEnumerable<Node> CheckRelationshipOperator(Node node, GraphQuerySchema schemaTest)
        {
            IEnumerable<Node> stoppingPointNodes = null;

            if (schemaTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipUid == schemaTest.Id);
            }
            else if (schemaTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipUid != schemaTest.Id);
            }

            return stoppingPointNodes;
        }
        private IEnumerable <Node> CheckDescriptorOperator(Node node, GraphQuerySchema schemaTest)
        {
            IEnumerable <Node> stoppingPointNodes = null;

            if (schemaTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorUid == schemaTest.Id);
            }
            else if (schemaTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Descriptor localDescriptor) => true, (Descriptor foreignDescriptor) => foreignDescriptor.DescriptorUid != schemaTest.Id);
            }

            return(stoppingPointNodes);
        }
        private IEnumerable <Node> CheckRelationshipOperator(Node node, GraphQuerySchema schemaTest)
        {
            IEnumerable <Node> stoppingPointNodes = null;

            if (schemaTest.Operator == "Equals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipUid == schemaTest.Id);
            }
            else if (schemaTest.Operator == "NotEquals")
            {
                stoppingPointNodes = node.GetConnectedNodes((Relationship relationship) => relationship.RelationshipUid != schemaTest.Id);
            }

            return(stoppingPointNodes);
        }
예제 #5
0
        private IEnumerable <Node> CheckNodeOperator(IEnumerable <Node> nodes, GraphQuerySchema schemaTest)
        {
            List <Node> filteredNodes = new List <Node>();

            foreach (Node node in nodes)
            {
                if (schemaTest.Operator.Equals("Equals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeUid == schemaTest.Id)
                    {
                        filteredNodes.Add(node);
                    }
                }
                else if (schemaTest.Operator.Equals("NotEquals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeUid != schemaTest.Id)
                    {
                        filteredNodes.Add(node);
                    }
                }
            }

            return(filteredNodes);
        }
예제 #6
0
        private IEnumerable<Node> CheckNodeOperator(IEnumerable<Node> nodes, GraphQuerySchema schemaTest)
        {
            List<Node> filteredNodes = new List<Node>();

            foreach (Node node in nodes)
            {
                if (schemaTest.Operator.Equals("Equals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeUid == schemaTest.Id)
                    {
                        filteredNodes.Add(node);
                    }
                }
                else if (schemaTest.Operator.Equals("NotEquals", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (node.NodeUid != schemaTest.Id)
                    {
                        filteredNodes.Add(node);
                    }
                }
            }

            return filteredNodes;
        }