/// <summary> /// Determines whether this Node is equal to a Graph Literal Node /// </summary> /// <param name="other">Graph Literal Node</param> /// <returns></returns> public override bool Equals(IGraphLiteralNode other) { if (ReferenceEquals(this, other)) { return(true); } return(EqualityHelper.AreGraphLiteralsEqual(this, other)); }
/// <summary> /// Implementation of the Equals method for Graph Literal Nodes. Graph Literals are considered Equal if their respective Subgraphs are equal /// </summary> /// <param name="other">Object to compare the Node with</param> /// <returns></returns> public override bool Equals(INode other) { if ((Object)other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (other.NodeType == NodeType.GraphLiteral) { return(EqualityHelper.AreGraphLiteralsEqual(this, (IGraphLiteralNode)other)); } else { //Can only be equal to a Graph Literal Node return(false); } }