Exemplo n.º 1
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = (int)Type;
                hashCode = (hashCode * 397) ^ (int)Strategy;

                if (Type == SpatialFieldType.Geography)
                {
                    hashCode = (hashCode * 397) ^ Units.GetHashCode();
                }

                if (Strategy != SpatialSearchStrategy.BoundingBox)
                {
                    hashCode = (hashCode * 397) ^ MaxTreeLevel;

                    if (Type == SpatialFieldType.Cartesian)
                    {
                        hashCode = (hashCode * 397) ^ MinX.GetHashCode();
                        hashCode = (hashCode * 397) ^ MaxX.GetHashCode();
                        hashCode = (hashCode * 397) ^ MinY.GetHashCode();
                        hashCode = (hashCode * 397) ^ MaxY.GetHashCode();
                    }
                }

                return(hashCode);
            }
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hashCode = -1882349014;

            hashCode = hashCode * -1521134295 + MinX.GetHashCode();
            hashCode = hashCode * -1521134295 + MinY.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxX.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxY.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 3
0
 /// <summary>
 /// A hash code produced out of hash codes of <see cref="MinX"/>, <see cref="MinY"/>, <see cref="SizeX"/>, <see cref="SizeY"/>.
 /// </summary>
 /// <returns>A hash code produced out of hash codes of <see cref="MinX"/>, <see cref="MinY"/>, <see cref="SizeX"/>, <see cref="SizeY"/>.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = MinX.GetHashCode();
         hashCode = (hashCode * 397) ^ MinY.GetHashCode();
         hashCode = (hashCode * 397) ^ SizeX.GetHashCode();
         hashCode = (hashCode * 397) ^ SizeY.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MinX.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxX.GetHashCode();
         hashCode = (hashCode * 397) ^ MinY.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxY.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            unchecked {
                hashCode += 1000000007 * MinX.GetHashCode();
                hashCode += 1000000009 * MinY.GetHashCode();
                hashCode += 1000000021 * Width.GetHashCode();
                hashCode += 1000000033 * Height.GetHashCode();
            }
            return(hashCode);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Hashcode method
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hashCode = -1838259446;

            hashCode = hashCode * -1521134295 + MinX.GetHashCode();
            hashCode = hashCode * -1521134295 + MinY.GetHashCode();
            hashCode = hashCode * -1521134295 + MinZ.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxX.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxY.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxZ.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 7
0
 public override int GetHashCode()
 {
     return(MinX.GetHashCode() ^ MinY.GetHashCode() ^ MaxX.GetHashCode() ^ MaxY.GetHashCode());
 }
Exemplo n.º 8
0
 public override int GetHashCode()
 {
     return(MinX.GetHashCode() >> 3 ^ MaxX.GetHashCode() << 3 ^ MinY.GetHashCode() >> 2 ^ MaxY.GetHashCode() << 2);
 }