/// <summary> /// Returns true if ResponseMapInfoFeatures instances are equal /// </summary> /// <param name="other">Instance of ResponseMapInfoFeatures to be compared</param> /// <returns>Boolean</returns> public bool Equals(ResponseMapInfoFeatures other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PublicTransport == other.PublicTransport || PublicTransport != null && PublicTransport.Equals(other.PublicTransport) ) && ( Fares == other.Fares || Fares.Equals(other.Fares) ) && ( Postcodes == other.Postcodes || Postcodes.Equals(other.Postcodes) )); }
/// <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 (PublicTransport != null) { hashCode = hashCode * 59 + PublicTransport.GetHashCode(); } hashCode = hashCode * 59 + Fares.GetHashCode(); hashCode = hashCode * 59 + Postcodes.GetHashCode(); return(hashCode); } }