예제 #1
0
 /// <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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (ClimbCategory != null)
         {
             hashCode = hashCode * 59 + ClimbCategory.GetHashCode();
         }
         if (ClimbCategoryDesc != null)
         {
             hashCode = hashCode * 59 + ClimbCategoryDesc.GetHashCode();
         }
         if (AvgGrade != null)
         {
             hashCode = hashCode * 59 + AvgGrade.GetHashCode();
         }
         if (StartLatlng != null)
         {
             hashCode = hashCode * 59 + StartLatlng.GetHashCode();
         }
         if (EndLatlng != null)
         {
             hashCode = hashCode * 59 + EndLatlng.GetHashCode();
         }
         if (ElevDifference != null)
         {
             hashCode = hashCode * 59 + ElevDifference.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (Points != null)
         {
             hashCode = hashCode * 59 + Points.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
 /// <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 (ExternalId != null)
         {
             hashCode = hashCode * 59 + ExternalId.GetHashCode();
         }
         if (UploadId != null)
         {
             hashCode = hashCode * 59 + UploadId.GetHashCode();
         }
         if (Athlete != null)
         {
             hashCode = hashCode * 59 + Athlete.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (MovingTime != null)
         {
             hashCode = hashCode * 59 + MovingTime.GetHashCode();
         }
         if (ElapsedTime != null)
         {
             hashCode = hashCode * 59 + ElapsedTime.GetHashCode();
         }
         if (TotalElevationGain != null)
         {
             hashCode = hashCode * 59 + TotalElevationGain.GetHashCode();
         }
         if (ElevHigh != null)
         {
             hashCode = hashCode * 59 + ElevHigh.GetHashCode();
         }
         if (ElevLow != null)
         {
             hashCode = hashCode * 59 + ElevLow.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (StartDate != null)
         {
             hashCode = hashCode * 59 + StartDate.GetHashCode();
         }
         if (StartDateLocal != null)
         {
             hashCode = hashCode * 59 + StartDateLocal.GetHashCode();
         }
         if (Timezone != null)
         {
             hashCode = hashCode * 59 + Timezone.GetHashCode();
         }
         if (StartLatlng != null)
         {
             hashCode = hashCode * 59 + StartLatlng.GetHashCode();
         }
         if (EndLatlng != null)
         {
             hashCode = hashCode * 59 + EndLatlng.GetHashCode();
         }
         if (AchievementCount != null)
         {
             hashCode = hashCode * 59 + AchievementCount.GetHashCode();
         }
         if (KudosCount != null)
         {
             hashCode = hashCode * 59 + KudosCount.GetHashCode();
         }
         if (CommentCount != null)
         {
             hashCode = hashCode * 59 + CommentCount.GetHashCode();
         }
         if (AthleteCount != null)
         {
             hashCode = hashCode * 59 + AthleteCount.GetHashCode();
         }
         if (PhotoCount != null)
         {
             hashCode = hashCode * 59 + PhotoCount.GetHashCode();
         }
         if (TotalPhotoCount != null)
         {
             hashCode = hashCode * 59 + TotalPhotoCount.GetHashCode();
         }
         if (Map != null)
         {
             hashCode = hashCode * 59 + Map.GetHashCode();
         }
         if (Trainer != null)
         {
             hashCode = hashCode * 59 + Trainer.GetHashCode();
         }
         if (Commute != null)
         {
             hashCode = hashCode * 59 + Commute.GetHashCode();
         }
         if (Manual != null)
         {
             hashCode = hashCode * 59 + Manual.GetHashCode();
         }
         if (_Private != null)
         {
             hashCode = hashCode * 59 + _Private.GetHashCode();
         }
         if (Flagged != null)
         {
             hashCode = hashCode * 59 + Flagged.GetHashCode();
         }
         if (WorkoutType != null)
         {
             hashCode = hashCode * 59 + WorkoutType.GetHashCode();
         }
         if (UploadIdStr != null)
         {
             hashCode = hashCode * 59 + UploadIdStr.GetHashCode();
         }
         if (AverageSpeed != null)
         {
             hashCode = hashCode * 59 + AverageSpeed.GetHashCode();
         }
         if (MaxSpeed != null)
         {
             hashCode = hashCode * 59 + MaxSpeed.GetHashCode();
         }
         if (HasKudoed != null)
         {
             hashCode = hashCode * 59 + HasKudoed.GetHashCode();
         }
         if (HideFromHome != null)
         {
             hashCode = hashCode * 59 + HideFromHome.GetHashCode();
         }
         if (GearId != null)
         {
             hashCode = hashCode * 59 + GearId.GetHashCode();
         }
         if (Kilojoules != null)
         {
             hashCode = hashCode * 59 + Kilojoules.GetHashCode();
         }
         if (AverageWatts != null)
         {
             hashCode = hashCode * 59 + AverageWatts.GetHashCode();
         }
         if (DeviceWatts != null)
         {
             hashCode = hashCode * 59 + DeviceWatts.GetHashCode();
         }
         if (MaxWatts != null)
         {
             hashCode = hashCode * 59 + MaxWatts.GetHashCode();
         }
         if (WeightedAverageWatts != null)
         {
             hashCode = hashCode * 59 + WeightedAverageWatts.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #3
0
        /// <summary>
        /// Returns true if SummaryActivity instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryActivity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryActivity other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ExternalId == other.ExternalId ||
                     ExternalId != null &&
                     ExternalId.Equals(other.ExternalId)
                     ) &&
                 (
                     UploadId == other.UploadId ||
                     UploadId != null &&
                     UploadId.Equals(other.UploadId)
                 ) &&
                 (
                     Athlete == other.Athlete ||
                     Athlete != null &&
                     Athlete.Equals(other.Athlete)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     MovingTime == other.MovingTime ||
                     MovingTime != null &&
                     MovingTime.Equals(other.MovingTime)
                 ) &&
                 (
                     ElapsedTime == other.ElapsedTime ||
                     ElapsedTime != null &&
                     ElapsedTime.Equals(other.ElapsedTime)
                 ) &&
                 (
                     TotalElevationGain == other.TotalElevationGain ||
                     TotalElevationGain != null &&
                     TotalElevationGain.Equals(other.TotalElevationGain)
                 ) &&
                 (
                     ElevHigh == other.ElevHigh ||
                     ElevHigh != null &&
                     ElevHigh.Equals(other.ElevHigh)
                 ) &&
                 (
                     ElevLow == other.ElevLow ||
                     ElevLow != null &&
                     ElevLow.Equals(other.ElevLow)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     StartDate == other.StartDate ||
                     StartDate != null &&
                     StartDate.Equals(other.StartDate)
                 ) &&
                 (
                     StartDateLocal == other.StartDateLocal ||
                     StartDateLocal != null &&
                     StartDateLocal.Equals(other.StartDateLocal)
                 ) &&
                 (
                     Timezone == other.Timezone ||
                     Timezone != null &&
                     Timezone.Equals(other.Timezone)
                 ) &&
                 (
                     StartLatlng == other.StartLatlng ||
                     StartLatlng != null &&
                     StartLatlng.Equals(other.StartLatlng)
                 ) &&
                 (
                     EndLatlng == other.EndLatlng ||
                     EndLatlng != null &&
                     EndLatlng.Equals(other.EndLatlng)
                 ) &&
                 (
                     AchievementCount == other.AchievementCount ||
                     AchievementCount != null &&
                     AchievementCount.Equals(other.AchievementCount)
                 ) &&
                 (
                     KudosCount == other.KudosCount ||
                     KudosCount != null &&
                     KudosCount.Equals(other.KudosCount)
                 ) &&
                 (
                     CommentCount == other.CommentCount ||
                     CommentCount != null &&
                     CommentCount.Equals(other.CommentCount)
                 ) &&
                 (
                     AthleteCount == other.AthleteCount ||
                     AthleteCount != null &&
                     AthleteCount.Equals(other.AthleteCount)
                 ) &&
                 (
                     PhotoCount == other.PhotoCount ||
                     PhotoCount != null &&
                     PhotoCount.Equals(other.PhotoCount)
                 ) &&
                 (
                     TotalPhotoCount == other.TotalPhotoCount ||
                     TotalPhotoCount != null &&
                     TotalPhotoCount.Equals(other.TotalPhotoCount)
                 ) &&
                 (
                     Map == other.Map ||
                     Map != null &&
                     Map.Equals(other.Map)
                 ) &&
                 (
                     Trainer == other.Trainer ||
                     Trainer != null &&
                     Trainer.Equals(other.Trainer)
                 ) &&
                 (
                     Commute == other.Commute ||
                     Commute != null &&
                     Commute.Equals(other.Commute)
                 ) &&
                 (
                     Manual == other.Manual ||
                     Manual != null &&
                     Manual.Equals(other.Manual)
                 ) &&
                 (
                     _Private == other._Private ||
                     _Private != null &&
                     _Private.Equals(other._Private)
                 ) &&
                 (
                     Flagged == other.Flagged ||
                     Flagged != null &&
                     Flagged.Equals(other.Flagged)
                 ) &&
                 (
                     WorkoutType == other.WorkoutType ||
                     WorkoutType != null &&
                     WorkoutType.Equals(other.WorkoutType)
                 ) &&
                 (
                     UploadIdStr == other.UploadIdStr ||
                     UploadIdStr != null &&
                     UploadIdStr.Equals(other.UploadIdStr)
                 ) &&
                 (
                     AverageSpeed == other.AverageSpeed ||
                     AverageSpeed != null &&
                     AverageSpeed.Equals(other.AverageSpeed)
                 ) &&
                 (
                     MaxSpeed == other.MaxSpeed ||
                     MaxSpeed != null &&
                     MaxSpeed.Equals(other.MaxSpeed)
                 ) &&
                 (
                     HasKudoed == other.HasKudoed ||
                     HasKudoed != null &&
                     HasKudoed.Equals(other.HasKudoed)
                 ) &&
                 (
                     HideFromHome == other.HideFromHome ||
                     HideFromHome != null &&
                     HideFromHome.Equals(other.HideFromHome)
                 ) &&
                 (
                     GearId == other.GearId ||
                     GearId != null &&
                     GearId.Equals(other.GearId)
                 ) &&
                 (
                     Kilojoules == other.Kilojoules ||
                     Kilojoules != null &&
                     Kilojoules.Equals(other.Kilojoules)
                 ) &&
                 (
                     AverageWatts == other.AverageWatts ||
                     AverageWatts != null &&
                     AverageWatts.Equals(other.AverageWatts)
                 ) &&
                 (
                     DeviceWatts == other.DeviceWatts ||
                     DeviceWatts != null &&
                     DeviceWatts.Equals(other.DeviceWatts)
                 ) &&
                 (
                     MaxWatts == other.MaxWatts ||
                     MaxWatts != null &&
                     MaxWatts.Equals(other.MaxWatts)
                 ) &&
                 (
                     WeightedAverageWatts == other.WeightedAverageWatts ||
                     WeightedAverageWatts != null &&
                     WeightedAverageWatts.Equals(other.WeightedAverageWatts)
                 ));
        }
예제 #4
0
 /// <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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (ActivityType != null)
         {
             hashCode = hashCode * 59 + ActivityType.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (AverageGrade != null)
         {
             hashCode = hashCode * 59 + AverageGrade.GetHashCode();
         }
         if (MaximumGrade != null)
         {
             hashCode = hashCode * 59 + MaximumGrade.GetHashCode();
         }
         if (ElevationHigh != null)
         {
             hashCode = hashCode * 59 + ElevationHigh.GetHashCode();
         }
         if (ElevationLow != null)
         {
             hashCode = hashCode * 59 + ElevationLow.GetHashCode();
         }
         if (StartLatlng != null)
         {
             hashCode = hashCode * 59 + StartLatlng.GetHashCode();
         }
         if (EndLatlng != null)
         {
             hashCode = hashCode * 59 + EndLatlng.GetHashCode();
         }
         if (ClimbCategory != null)
         {
             hashCode = hashCode * 59 + ClimbCategory.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (_Private != null)
         {
             hashCode = hashCode * 59 + _Private.GetHashCode();
         }
         if (AthletePrEffort != null)
         {
             hashCode = hashCode * 59 + AthletePrEffort.GetHashCode();
         }
         if (AthleteSegmentStats != null)
         {
             hashCode = hashCode * 59 + AthleteSegmentStats.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #5
0
        /// <summary>
        /// Returns true if SummarySegment instances are equal
        /// </summary>
        /// <param name="other">Instance of SummarySegment to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummarySegment other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     ActivityType == other.ActivityType ||
                     ActivityType != null &&
                     ActivityType.Equals(other.ActivityType)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     AverageGrade == other.AverageGrade ||
                     AverageGrade != null &&
                     AverageGrade.Equals(other.AverageGrade)
                 ) &&
                 (
                     MaximumGrade == other.MaximumGrade ||
                     MaximumGrade != null &&
                     MaximumGrade.Equals(other.MaximumGrade)
                 ) &&
                 (
                     ElevationHigh == other.ElevationHigh ||
                     ElevationHigh != null &&
                     ElevationHigh.Equals(other.ElevationHigh)
                 ) &&
                 (
                     ElevationLow == other.ElevationLow ||
                     ElevationLow != null &&
                     ElevationLow.Equals(other.ElevationLow)
                 ) &&
                 (
                     StartLatlng == other.StartLatlng ||
                     StartLatlng != null &&
                     StartLatlng.Equals(other.StartLatlng)
                 ) &&
                 (
                     EndLatlng == other.EndLatlng ||
                     EndLatlng != null &&
                     EndLatlng.Equals(other.EndLatlng)
                 ) &&
                 (
                     ClimbCategory == other.ClimbCategory ||
                     ClimbCategory != null &&
                     ClimbCategory.Equals(other.ClimbCategory)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     _Private == other._Private ||
                     _Private != null &&
                     _Private.Equals(other._Private)
                 ) &&
                 (
                     AthletePrEffort == other.AthletePrEffort ||
                     AthletePrEffort != null &&
                     AthletePrEffort.Equals(other.AthletePrEffort)
                 ) &&
                 (
                     AthleteSegmentStats == other.AthleteSegmentStats ||
                     AthleteSegmentStats != null &&
                     AthleteSegmentStats.Equals(other.AthleteSegmentStats)
                 ));
        }
예제 #6
0
        /// <summary>
        /// Returns true if ExplorerSegment instances are equal
        /// </summary>
        /// <param name="other">Instance of ExplorerSegment to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ExplorerSegment other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     ClimbCategory == other.ClimbCategory ||
                     ClimbCategory != null &&
                     ClimbCategory.Equals(other.ClimbCategory)
                 ) &&
                 (
                     ClimbCategoryDesc == other.ClimbCategoryDesc ||
                     ClimbCategoryDesc != null &&
                     ClimbCategoryDesc.Equals(other.ClimbCategoryDesc)
                 ) &&
                 (
                     AvgGrade == other.AvgGrade ||
                     AvgGrade != null &&
                     AvgGrade.Equals(other.AvgGrade)
                 ) &&
                 (
                     StartLatlng == other.StartLatlng ||
                     StartLatlng != null &&
                     StartLatlng.Equals(other.StartLatlng)
                 ) &&
                 (
                     EndLatlng == other.EndLatlng ||
                     EndLatlng != null &&
                     EndLatlng.Equals(other.EndLatlng)
                 ) &&
                 (
                     ElevDifference == other.ElevDifference ||
                     ElevDifference != null &&
                     ElevDifference.Equals(other.ElevDifference)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     Points == other.Points ||
                     Points != null &&
                     Points.Equals(other.Points)
                 ));
        }