コード例 #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 (Count != null)
         {
             hashCode = hashCode * 59 + Count.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 (ElevationGain != null)
         {
             hashCode = hashCode * 59 + ElevationGain.GetHashCode();
         }
         if (AchievementCount != null)
         {
             hashCode = hashCode * 59 + AchievementCount.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((ElapsedTime.GetHashCode() * 397) ^ Message.GetHashCode());
     }
 }
コード例 #3
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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (StartDateLocal != null)
         {
             hashCode = hashCode * 59 + StartDateLocal.GetHashCode();
         }
         if (ElapsedTime != null)
         {
             hashCode = hashCode * 59 + ElapsedTime.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (Trainer != null)
         {
             hashCode = hashCode * 59 + Trainer.GetHashCode();
         }
         if (Commute != null)
         {
             hashCode = hashCode * 59 + Commute.GetHashCode();
         }
         if (HideFromHome != null)
         {
             hashCode = hashCode * 59 + HideFromHome.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #4
0
ファイル: RouteInfo.cs プロジェクト: szelusbk/TrackingWebApi
        public override int GetHashCode()
        {
            unchecked
            {
                const int HashingBase       = (int)2166136261;
                const int HashingMultiplier = 16777619;

                int hash = HashingBase;
                hash = (hash * HashingMultiplier) ^ GpsName.GetHashCode();
                hash = (hash * HashingMultiplier) ^ GpsStatus.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Imei.GetHashCode();
                hash = (hash * HashingMultiplier) ^ LastDate.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Battery.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ElapsedTime.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Distance.GetHashCode();
                hash = (hash * HashingMultiplier) ^ Imei.GetHashCode();
                hash = (hash * HashingMultiplier) ^ GoogleDistance.GetHashCode();
                hash = (hash * HashingMultiplier) ^ LastLatitude.GetHashCode();
                hash = (hash * HashingMultiplier) ^ LastLongitude.GetHashCode();
                hash = (hash * HashingMultiplier) ^ ((LatLngList != null) ? LatLngList.GetHashCode() : 0);
                return(hash);
            }
        }
コード例 #5
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 (ActivityId != null)
         {
             hashCode = hashCode * 59 + ActivityId.GetHashCode();
         }
         if (ElapsedTime != null)
         {
             hashCode = hashCode * 59 + ElapsedTime.GetHashCode();
         }
         if (StartDate != null)
         {
             hashCode = hashCode * 59 + StartDate.GetHashCode();
         }
         if (StartDateLocal != null)
         {
             hashCode = hashCode * 59 + StartDateLocal.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (IsKom != null)
         {
             hashCode = hashCode * 59 + IsKom.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #6
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 (AverageSpeed != null)
         {
             hashCode = hashCode * 59 + AverageSpeed.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (ElapsedTime != null)
         {
             hashCode = hashCode * 59 + ElapsedTime.GetHashCode();
         }
         if (ElevationDifference != null)
         {
             hashCode = hashCode * 59 + ElevationDifference.GetHashCode();
         }
         if (PaceZone != null)
         {
             hashCode = hashCode * 59 + PaceZone.GetHashCode();
         }
         if (MovingTime != null)
         {
             hashCode = hashCode * 59 + MovingTime.GetHashCode();
         }
         if (_Split != null)
         {
             hashCode = hashCode * 59 + _Split.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #7
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);
     }
 }
コード例 #8
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 (Activity != null)
         {
             hashCode = hashCode * 59 + Activity.GetHashCode();
         }
         if (Athlete != null)
         {
             hashCode = hashCode * 59 + Athlete.GetHashCode();
         }
         if (AverageCadence != null)
         {
             hashCode = hashCode * 59 + AverageCadence.GetHashCode();
         }
         if (AverageSpeed != null)
         {
             hashCode = hashCode * 59 + AverageSpeed.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (ElapsedTime != null)
         {
             hashCode = hashCode * 59 + ElapsedTime.GetHashCode();
         }
         if (StartIndex != null)
         {
             hashCode = hashCode * 59 + StartIndex.GetHashCode();
         }
         if (EndIndex != null)
         {
             hashCode = hashCode * 59 + EndIndex.GetHashCode();
         }
         if (LapIndex != null)
         {
             hashCode = hashCode * 59 + LapIndex.GetHashCode();
         }
         if (MaxSpeed != null)
         {
             hashCode = hashCode * 59 + MaxSpeed.GetHashCode();
         }
         if (MovingTime != null)
         {
             hashCode = hashCode * 59 + MovingTime.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (PaceZone != null)
         {
             hashCode = hashCode * 59 + PaceZone.GetHashCode();
         }
         if (Split != null)
         {
             hashCode = hashCode * 59 + Split.GetHashCode();
         }
         if (StartDate != null)
         {
             hashCode = hashCode * 59 + StartDate.GetHashCode();
         }
         if (StartDateLocal != null)
         {
             hashCode = hashCode * 59 + StartDateLocal.GetHashCode();
         }
         if (TotalElevationGain != null)
         {
             hashCode = hashCode * 59 + TotalElevationGain.GetHashCode();
         }
         return(hashCode);
     }
 }