public override int GetHashCode() { var hashCode = 0; unchecked { if (LeftContext != null) { hashCode = (23 * hashCode) + LeftContext.GetHashCode(); } if (LeftValue != null) { hashCode = (23 * hashCode) + LeftValue.GetHashCode(); } if (LeftSetter != null) { hashCode = (23 * hashCode) + LeftSetter.GetHashCode(); } if (RightValue != null) { hashCode = (23 * hashCode) + RightValue.GetHashCode(); } if (RightSetter != null) { hashCode = (23 * hashCode) + RightSetter.GetHashCode(); } if (RightContext != null) { hashCode = (23 * hashCode) + RightContext.GetHashCode(); } } return(hashCode); }
public bool Equals(ContextPair o) { if (this == o) { return(true); } return(LeftContext.Equals(o.LeftContext) && RightContext.Equals(o.RightContext)); }
/** * /// Determines if the given object is equal to this UnitContext * * /// @param o the object to compare to * /// @return <code>true</code> if the objects are equal return; */ public override bool Equals(Object o) { if (this == o) { return(true); } else if (o is ContextPair) { ContextPair other = (ContextPair)o; return(LeftContext.Equals(other.LeftContext) && RightContext.Equals(other.RightContext)); } return(false); }