Exemplo 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 (CustomZones != null)
         {
             hashCode = hashCode * 59 + CustomZones.GetHashCode();
         }
         if (Zones != null)
         {
             hashCode = hashCode * 59 + Zones.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 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 (Score != null)
         {
             hashCode = hashCode * 59 + Score.GetHashCode();
         }
         if (DistributionBuckets != null)
         {
             hashCode = hashCode * 59 + DistributionBuckets.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (SensorBased != null)
         {
             hashCode = hashCode * 59 + SensorBased.GetHashCode();
         }
         if (Points != null)
         {
             hashCode = hashCode * 59 + Points.GetHashCode();
         }
         if (CustomZones != null)
         {
             hashCode = hashCode * 59 + CustomZones.GetHashCode();
         }
         if (Max != null)
         {
             hashCode = hashCode * 59 + Max.GetHashCode();
         }
         return(hashCode);
     }
 }