예제 #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         hashCode = hashCode * 59 + Type.GetHashCode();
         hashCode = hashCode * 59 + Barcode1DSymbology.GetHashCode();
         if (Data != null)
         {
             hashCode = hashCode * 59 + Data.GetHashCode();
         }
         hashCode = hashCode * 59 + X1.GetHashCode();
         hashCode = hashCode * 59 + X2.GetHashCode();
         hashCode = hashCode * 59 + X3.GetHashCode();
         hashCode = hashCode * 59 + X4.GetHashCode();
         hashCode = hashCode * 59 + Y1.GetHashCode();
         hashCode = hashCode * 59 + Y2.GetHashCode();
         hashCode = hashCode * 59 + Y3.GetHashCode();
         hashCode = hashCode * 59 + Y4.GetHashCode();
         hashCode = hashCode * 59 + BboxLeftInches.GetHashCode();
         hashCode = hashCode * 59 + BboxTopInches.GetHashCode();
         hashCode = hashCode * 59 + BboxWidthInches.GetHashCode();
         hashCode = hashCode * 59 + BboxHeightInches.GetHashCode();
         hashCode = hashCode * 59 + PageNumber.GetHashCode();
         hashCode = hashCode * 59 + PagePixelWidth.GetHashCode();
         hashCode = hashCode * 59 + PagePixelHeight.GetHashCode();
         hashCode = hashCode * 59 + PageHorizontalResolution.GetHashCode();
         hashCode = hashCode * 59 + PageVerticalResolution.GetHashCode();
         return(hashCode);
     }
 }
예제 #2
0
        public override int GetHashCode()
        {
            int prime = 37;
            int hash  = 1;

            hash = prime * hash + X1.GetHashCode();
            hash = prime * hash + Y1.GetHashCode();
            hash = prime * hash + X2.GetHashCode();
            hash = prime * hash + Y2.GetHashCode();
            hash = prime * hash + X3.GetHashCode();
            hash = prime * hash + Y3.GetHashCode();
            return(hash);
        }