/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Transportation != null) { hashCode = hashCode * 59 + Transportation.GetHashCode(); } hashCode = hashCode * 59 + TravelTime.GetHashCode(); if (DepartureTime != null) { hashCode = hashCode * 59 + DepartureTime.GetHashCode(); } if (Properties != null) { hashCode = hashCode * 59 + Properties.GetHashCode(); } if (Range != null) { hashCode = hashCode * 59 + Range.GetHashCode(); } return(hashCode); } }
/// <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 :) hashCode = hashCode * 59 + TravelTime.GetHashCode(); hashCode = hashCode * 59 + Distance.GetHashCode(); if (DistanceBreakdown != null) { hashCode = hashCode * 59 + DistanceBreakdown.GetHashCode(); } if (Fares != null) { hashCode = hashCode * 59 + Fares.GetHashCode(); } if (Route != null) { hashCode = hashCode * 59 + Route.GetHashCode(); } return(hashCode); } }
/// <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 :) hashCode = hashCode * 59 + TravelTime.GetHashCode(); hashCode = hashCode * 59 + Distance.GetHashCode(); return(hashCode); } }
/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } hashCode = hashCode * 59 + Type.GetHashCode(); hashCode = hashCode * 59 + Mode.GetHashCode(); if (Directions != null) { hashCode = hashCode * 59 + Directions.GetHashCode(); } hashCode = hashCode * 59 + Distance.GetHashCode(); hashCode = hashCode * 59 + TravelTime.GetHashCode(); if (Coords != null) { hashCode = hashCode * 59 + Coords.GetHashCode(); } if (Direction != null) { hashCode = hashCode * 59 + Direction.GetHashCode(); } if (Road != null) { hashCode = hashCode * 59 + Road.GetHashCode(); } if (Turn != null) { hashCode = hashCode * 59 + Turn.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (DepartureStation != null) { hashCode = hashCode * 59 + DepartureStation.GetHashCode(); } if (ArrivalStation != null) { hashCode = hashCode * 59 + ArrivalStation.GetHashCode(); } if (DepartsAt != null) { hashCode = hashCode * 59 + DepartsAt.GetHashCode(); } if (ArrivesAt != null) { hashCode = hashCode * 59 + ArrivesAt.GetHashCode(); } hashCode = hashCode * 59 + NumStops.GetHashCode(); return(hashCode); } }