/// <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 + GammaCorrection.GetHashCode(); hashCode = hashCode * 59 + Brightness.GetHashCode(); hashCode = hashCode * 59 + Contrast.GetHashCode(); hashCode = hashCode * 59 + Saturation.GetHashCode(); hashCode = hashCode * 59 + AutoContrastEnhancement.GetHashCode(); hashCode = hashCode * 59 + ContrastHistogramStretch.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns true if ImageAdjustParameters instances are equal /// </summary> /// <param name="input">Instance of ImageAdjustParameters to be compared</param> /// <returns>Boolean</returns> public bool Equals(ImageAdjustParameters 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) ) && ( GammaCorrection == input.GammaCorrection || GammaCorrection.Equals(input.GammaCorrection) ) && ( Brightness == input.Brightness || Brightness.Equals(input.Brightness) ) && ( Contrast == input.Contrast || Contrast.Equals(input.Contrast) ) && ( Saturation == input.Saturation || Saturation.Equals(input.Saturation) ) && ( AutoContrastEnhancement == input.AutoContrastEnhancement || AutoContrastEnhancement.Equals(input.AutoContrastEnhancement) ) && ( ContrastHistogramStretch == input.ContrastHistogramStretch || ContrastHistogramStretch.Equals(input.ContrastHistogramStretch) )); }