Exemplo n.º 1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (BoundingBoxes != null ? BoundingBoxes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CRS != null ? CRS.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Type;
         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 (SearchId != null)
         {
             hashCode = hashCode * 59 + SearchId.GetHashCode();
         }
         if (BoundingBoxes != null)
         {
             hashCode = hashCode * 59 + BoundingBoxes.GetHashCode();
         }
         if (Properties != null)
         {
             hashCode = hashCode * 59 + Properties.GetHashCode();
         }
         return(hashCode);
     }
 }