/// <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); } }
/// <summary> /// Returns true if BarcodeInfo instances are equal /// </summary> /// <param name="input">Instance of BarcodeInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(BarcodeInfo input) { if (input == null) { return(false); } return (( Type == input.Type || Type.Equals(input.Type) ) && ( Barcode1DSymbology == input.Barcode1DSymbology || Barcode1DSymbology.Equals(input.Barcode1DSymbology) ) && ( Data == input.Data || (Data != null && Data.Equals(input.Data)) ) && ( X1 == input.X1 || X1.Equals(input.X1) ) && ( X2 == input.X2 || X2.Equals(input.X2) ) && ( X3 == input.X3 || X3.Equals(input.X3) ) && ( X4 == input.X4 || X4.Equals(input.X4) ) && ( Y1 == input.Y1 || Y1.Equals(input.Y1) ) && ( Y2 == input.Y2 || Y2.Equals(input.Y2) ) && ( Y3 == input.Y3 || Y3.Equals(input.Y3) ) && ( Y4 == input.Y4 || Y4.Equals(input.Y4) ) && ( BboxLeftInches == input.BboxLeftInches || BboxLeftInches.Equals(input.BboxLeftInches) ) && ( BboxTopInches == input.BboxTopInches || BboxTopInches.Equals(input.BboxTopInches) ) && ( BboxWidthInches == input.BboxWidthInches || BboxWidthInches.Equals(input.BboxWidthInches) ) && ( BboxHeightInches == input.BboxHeightInches || BboxHeightInches.Equals(input.BboxHeightInches) ) && ( PageNumber == input.PageNumber || PageNumber.Equals(input.PageNumber) ) && ( PagePixelWidth == input.PagePixelWidth || PagePixelWidth.Equals(input.PagePixelWidth) ) && ( PagePixelHeight == input.PagePixelHeight || PagePixelHeight.Equals(input.PagePixelHeight) ) && ( PageHorizontalResolution == input.PageHorizontalResolution || PageHorizontalResolution.Equals(input.PageHorizontalResolution) ) && ( PageVerticalResolution == input.PageVerticalResolution || PageVerticalResolution.Equals(input.PageVerticalResolution) )); }