protected override int AddToHashCode(int hashcode)
        {
            hashcode = (hashcode * 37) + WindSpeed.GetHashCode();
            hashcode = (hashcode * 37) + WaveAge.GetHashCode();

            return(hashcode);
        }
Beispiel #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Date.GetHashCode();
         hashCode = (hashCode * 397) ^ Pressure.GetHashCode();
         hashCode = (hashCode * 397) ^ Humidity.GetHashCode();
         hashCode = (hashCode * 397) ^ TemperatureMorning.GetHashCode();
         hashCode = (hashCode * 397) ^ TemperatureDay.GetHashCode();
         hashCode = (hashCode * 397) ^ TemperatureEvening.GetHashCode();
         hashCode = (hashCode * 397) ^ TemperatureNight.GetHashCode();
         hashCode = (hashCode * 397) ^ WindSpeed.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Icon != null ? Icon.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #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 (Date != null)
         {
             hashCode = hashCode * 59 + Date.GetHashCode();
         }
         if (Pressure != null)
         {
             hashCode = hashCode * 59 + Pressure.GetHashCode();
         }
         if (Humidity != null)
         {
             hashCode = hashCode * 59 + Humidity.GetHashCode();
         }
         if (WindSpeed != null)
         {
             hashCode = hashCode * 59 + WindSpeed.GetHashCode();
         }
         if (Clouds != null)
         {
             hashCode = hashCode * 59 + Clouds.GetHashCode();
         }
         if (Temperature != null)
         {
             hashCode = hashCode * 59 + Temperature.GetHashCode();
         }
         if (Weather != null)
         {
             hashCode = hashCode * 59 + Weather.GetHashCode();
         }
         return(hashCode);
     }
 }