Ejemplo n.º 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 (Time != null)
         {
             hashCode = hashCode * 59 + Time.GetHashCode();
         }
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (Latlng != null)
         {
             hashCode = hashCode * 59 + Latlng.GetHashCode();
         }
         if (Altitude != null)
         {
             hashCode = hashCode * 59 + Altitude.GetHashCode();
         }
         if (VelocitySmooth != null)
         {
             hashCode = hashCode * 59 + VelocitySmooth.GetHashCode();
         }
         if (Heartrate != null)
         {
             hashCode = hashCode * 59 + Heartrate.GetHashCode();
         }
         if (Cadence != null)
         {
             hashCode = hashCode * 59 + Cadence.GetHashCode();
         }
         if (Watts != null)
         {
             hashCode = hashCode * 59 + Watts.GetHashCode();
         }
         if (Temp != null)
         {
             hashCode = hashCode * 59 + Temp.GetHashCode();
         }
         if (Moving != null)
         {
             hashCode = hashCode * 59 + Moving.GetHashCode();
         }
         if (GradeSmooth != null)
         {
             hashCode = hashCode * 59 + GradeSmooth.GetHashCode();
         }
         return(hashCode);
     }
 }