/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + RoiLeft.GetHashCode();
         hashCode = hashCode * 59 + RoiTop.GetHashCode();
         hashCode = hashCode * 59 + RoiWidth.GetHashCode();
         hashCode = hashCode * 59 + RoiHeight.GetHashCode();
         hashCode = hashCode * 59 + ScanMode.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcode1D.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcodeQR.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcodeMicroQR.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcodePDF417.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcodeDataMatrix.GetHashCode();
         hashCode = hashCode * 59 + ScanBarcodeAztec.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if PdfReadBarcodesParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfReadBarcodesParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfReadBarcodesParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     ScanMode == input.ScanMode ||
                     ScanMode.Equals(input.ScanMode)
                 ) &&
                 (
                     ScanBarcode1D == input.ScanBarcode1D ||
                     ScanBarcode1D.Equals(input.ScanBarcode1D)
                 ) &&
                 (
                     ScanBarcodeQR == input.ScanBarcodeQR ||
                     ScanBarcodeQR.Equals(input.ScanBarcodeQR)
                 ) &&
                 (
                     ScanBarcodeMicroQR == input.ScanBarcodeMicroQR ||
                     ScanBarcodeMicroQR.Equals(input.ScanBarcodeMicroQR)
                 ) &&
                 (
                     ScanBarcodePDF417 == input.ScanBarcodePDF417 ||
                     ScanBarcodePDF417.Equals(input.ScanBarcodePDF417)
                 ) &&
                 (
                     ScanBarcodeDataMatrix == input.ScanBarcodeDataMatrix ||
                     ScanBarcodeDataMatrix.Equals(input.ScanBarcodeDataMatrix)
                 ) &&
                 (
                     ScanBarcodeAztec == input.ScanBarcodeAztec ||
                     ScanBarcodeAztec.Equals(input.ScanBarcodeAztec)
                 ));
        }
        /// <summary>
        /// Returns true if ImageReadBarcodesParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageReadBarcodesParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageReadBarcodesParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     RoiLeft == input.RoiLeft ||
                     RoiLeft.Equals(input.RoiLeft)
                 ) &&
                 (
                     RoiTop == input.RoiTop ||
                     RoiTop.Equals(input.RoiTop)
                 ) &&
                 (
                     RoiWidth == input.RoiWidth ||
                     RoiWidth.Equals(input.RoiWidth)
                 ) &&
                 (
                     RoiHeight == input.RoiHeight ||
                     RoiHeight.Equals(input.RoiHeight)
                 ) &&
                 (
                     ScanMode == input.ScanMode ||
                     ScanMode.Equals(input.ScanMode)
                 ) &&
                 (
                     ScanBarcode1D == input.ScanBarcode1D ||
                     ScanBarcode1D.Equals(input.ScanBarcode1D)
                 ) &&
                 (
                     ScanBarcodeQR == input.ScanBarcodeQR ||
                     ScanBarcodeQR.Equals(input.ScanBarcodeQR)
                 ) &&
                 (
                     ScanBarcodeMicroQR == input.ScanBarcodeMicroQR ||
                     ScanBarcodeMicroQR.Equals(input.ScanBarcodeMicroQR)
                 ) &&
                 (
                     ScanBarcodePDF417 == input.ScanBarcodePDF417 ||
                     ScanBarcodePDF417.Equals(input.ScanBarcodePDF417)
                 ) &&
                 (
                     ScanBarcodeDataMatrix == input.ScanBarcodeDataMatrix ||
                     ScanBarcodeDataMatrix.Equals(input.ScanBarcodeDataMatrix)
                 ) &&
                 (
                     ScanBarcodeAztec == input.ScanBarcodeAztec ||
                     ScanBarcodeAztec.Equals(input.ScanBarcodeAztec)
                 ));
        }