コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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;
        }