/// <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); } }
/// <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); } }