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; }
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; }
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); }
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); }
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); }
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; }