/// <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); } }
public override int GetHashCode() { unchecked { return((Aircraft.ToUpper().GetHashCode() * 3) + (CruisingSpeed.ToUpper().GetHashCode() * 3) + (DepartureAerodrome.GetHashCode() * 3) + (CruisingLevel.ToUpper().GetHashCode() * 3) + (DestinationAerodrome.GetHashCode() * 3) + (DepartureTime.GetHashCode() * 3) + (ActualDepartureTime.GetHashCode() * 3) + (EETHours.GetHashCode() * 3) + (EETMinutess.GetHashCode() * 3) + (EnduranceHours.GetHashCode() * 3) + (EnduranceMinutes.GetHashCode() * 3) + (AlternateAerodrome.GetHashCode() * 3) + (SecondAlternateAerodrome.GetHashCode() * 3) + (OtherInfo.ToUpper().GetHashCode() * 3) + (Route.ToUpper().GetHashCode() * 3) + (TypeOfFlight.GetHashCode() * 3) + (PersonsOnBoard.GetHashCode() * 3) + (Revision.GetHashCode() * 3) + (FlightRules.GetHashCode() * 3) * 17); } }
public override int GetHashCode() { int hOrigin = Origin != null?Origin.GetHashCode() : 0; int hDestination = Destination != null?Destination.GetHashCode() : 0; int hDepartureTime = DepartureTime != null?DepartureTime.GetHashCode() : 0; int hDestinationTime = DestinationTime != null?DestinationTime.GetHashCode() : 0; int hPrice = Price != 0 ? Price.GetHashCode() : 0; return(hOrigin ^ hDestination ^ hDepartureTime ^ hDestinationTime ^ hPrice); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Owner?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CurrentStatus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Temperature?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LoadPercentage?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TotalVolume?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AverageVolume?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (MaxTravelTime?.GetHashCode() ?? 0); return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = (Company != null ? Company.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (From != null ? From.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (To != null ? To.GetHashCode() : 0); hashCode = (hashCode * 397) ^ RequestedDate.GetHashCode(); hashCode = (hashCode * 397) ^ DepartureDate.GetHashCode(); hashCode = (hashCode * 397) ^ ArrivalDate.GetHashCode(); hashCode = (hashCode * 397) ^ DepartureTime.GetHashCode(); hashCode = (hashCode * 397) ^ ArrivalTime.GetHashCode(); hashCode = (hashCode * 397) ^ Price.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { var hashCode = -1474620316; hashCode = hashCode * -1521134295 + Id.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(RouteCode); hashCode = hashCode * -1521134295 + EqualityComparer <Airport> .Default.GetHashCode(OriginAirport); hashCode = hashCode * -1521134295 + EqualityComparer <Airport> .Default.GetHashCode(DestinationAirport); hashCode = hashCode * -1521134295 + DepartureTime.GetHashCode(); hashCode = hashCode * -1521134295 + ArrivalTime.GetHashCode(); hashCode = hashCode * -1521134295 + DayOfWeek.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 (DepartureTime != null) { hashCode = hashCode * 59 + DepartureTime.GetHashCode(); } if (ArrivalTime != null) { hashCode = hashCode * 59 + ArrivalTime.GetHashCode(); } if (Parts != null) { hashCode = hashCode * 59 + Parts.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 (AirlineClass != null) { hashCode = hashCode * 59 + AirlineClass.GetHashCode(); } if (ArrivalAirport != null) { hashCode = hashCode * 59 + ArrivalAirport.GetHashCode(); } if (ArrivalTime != null) { hashCode = hashCode * 59 + ArrivalTime.GetHashCode(); } if (CarrierCode != null) { hashCode = hashCode * 59 + CarrierCode.GetHashCode(); } if (ConjunctionTicket != null) { hashCode = hashCode * 59 + ConjunctionTicket.GetHashCode(); } if (CouponNumber != null) { hashCode = hashCode * 59 + CouponNumber.GetHashCode(); } if (Date != null) { hashCode = hashCode * 59 + Date.GetHashCode(); } if (DepartureTime != null) { hashCode = hashCode * 59 + DepartureTime.GetHashCode(); } if (EndorsementOrRestriction != null) { hashCode = hashCode * 59 + EndorsementOrRestriction.GetHashCode(); } if (ExchangeTicket != null) { hashCode = hashCode * 59 + ExchangeTicket.GetHashCode(); } if (Fare != null) { hashCode = hashCode * 59 + Fare.GetHashCode(); } if (FareBasis != null) { hashCode = hashCode * 59 + FareBasis.GetHashCode(); } if (Fee != null) { hashCode = hashCode * 59 + Fee.GetHashCode(); } if (FlightNumber != null) { hashCode = hashCode * 59 + FlightNumber.GetHashCode(); } if (Number != null) { hashCode = hashCode * 59 + Number.GetHashCode(); } if (OriginAirport != null) { hashCode = hashCode * 59 + OriginAirport.GetHashCode(); } if (PassengerClass != null) { hashCode = hashCode * 59 + PassengerClass.GetHashCode(); } if (ServiceClass != null) { hashCode = hashCode * 59 + ServiceClass.GetHashCode(); } if (StopoverCode != null) { hashCode = hashCode * 59 + StopoverCode.GetHashCode(); } if (Taxes != null) { hashCode = hashCode * 59 + Taxes.GetHashCode(); } return(hashCode); } }