/// <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); } }
public override int GetHashCode() { int hash = 1; if (CameraDev.Length != 0) { hash ^= CameraDev.GetHashCode(); } if (FrameId.Length != 0) { hash ^= FrameId.GetHashCode(); } if (PixelFormat.Length != 0) { hash ^= PixelFormat.GetHashCode(); } if (IoMethod != 0) { hash ^= IoMethod.GetHashCode(); } if (Width != 0) { hash ^= Width.GetHashCode(); } if (Height != 0) { hash ^= Height.GetHashCode(); } if (FrameRate != 0) { hash ^= FrameRate.GetHashCode(); } if (Monochrome != false) { hash ^= Monochrome.GetHashCode(); } if (Brightness != 0) { hash ^= Brightness.GetHashCode(); } if (Contrast != 0) { hash ^= Contrast.GetHashCode(); } if (Saturation != 0) { hash ^= Saturation.GetHashCode(); } if (Sharpness != 0) { hash ^= Sharpness.GetHashCode(); } if (Gain != 0) { hash ^= Gain.GetHashCode(); } if (AutoFocus != false) { hash ^= AutoFocus.GetHashCode(); } if (Focus != 0) { hash ^= Focus.GetHashCode(); } if (AutoExposure != false) { hash ^= AutoExposure.GetHashCode(); } if (Exposure != 0) { hash ^= Exposure.GetHashCode(); } if (AutoWhiteBalance != false) { hash ^= AutoWhiteBalance.GetHashCode(); } if (WhiteBalance != 0) { hash ^= WhiteBalance.GetHashCode(); } if (BytesPerPixel != 0) { hash ^= BytesPerPixel.GetHashCode(); } if (TriggerInternal != 0) { hash ^= TriggerInternal.GetHashCode(); } if (TriggerFps != 0) { hash ^= TriggerFps.GetHashCode(); } if (ChannelName.Length != 0) { hash ^= ChannelName.GetHashCode(); } if (DeviceWaitMs != 0) { hash ^= DeviceWaitMs.GetHashCode(); } if (SpinRate != 0) { hash ^= SpinRate.GetHashCode(); } if (OutputType != 0) { hash ^= OutputType.GetHashCode(); } if (compressConf_ != null) { hash ^= CompressConf.GetHashCode(); } return(hash); }