private bool Equals(BinaryRelationship other) { if (other == null || GetType() != other.GetType()) { return false; } return LeftOperand.Equals(other.LeftOperand) && RightOperand.Equals(other.RightOperand); }
protected bool AreOperandsMatching(BinaryRelationship rel2) { return LeftOperand.Equals(rel2.LeftOperand) && RightOperand.Equals(rel2.RightOperand) || RightOperand.Equals(rel2.LeftOperand) && LeftOperand.Equals(rel2.RightOperand); }