/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (DepartureSearches != null) { hashCode = hashCode * 59 + DepartureSearches.GetHashCode(); } if (ArrivalSearches != null) { hashCode = hashCode * 59 + ArrivalSearches.GetHashCode(); } if (Unions != null) { hashCode = hashCode * 59 + Unions.GetHashCode(); } if (Intersections != null) { hashCode = hashCode * 59 + Intersections.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if RequestTimeMap instances are equal /// </summary> /// <param name="other">Instance of RequestTimeMap to be compared</param> /// <returns>Boolean</returns> public bool Equals(RequestTimeMap other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DepartureSearches == other.DepartureSearches || DepartureSearches != null && other.DepartureSearches != null && DepartureSearches.SequenceEqual(other.DepartureSearches) ) && ( ArrivalSearches == other.ArrivalSearches || ArrivalSearches != null && other.ArrivalSearches != null && ArrivalSearches.SequenceEqual(other.ArrivalSearches) ) && ( Unions == other.Unions || Unions != null && other.Unions != null && Unions.SequenceEqual(other.Unions) ) && ( Intersections == other.Intersections || Intersections != null && other.Intersections != null && Intersections.SequenceEqual(other.Intersections) )); }