public override int GetHashCode() { unchecked { int hashCode = (int)EventType; hashCode = (hashCode * 397) ^ (int)DeviceType; hashCode = (hashCode * 397) ^ (int)PointerId; hashCode = (hashCode * 397) ^ Position.GetHashCode(); hashCode = (hashCode * 397) ^ Timestamp.GetHashCode(); hashCode = (hashCode * 397) ^ (int)KeyModifiers; hashCode = (hashCode * 397) ^ ContactRect.GetHashCode(); hashCode = (hashCode * 397) ^ IsBarrelButtonPressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsCanceled.GetHashCode(); hashCode = (hashCode * 397) ^ IsEraser.GetHashCode(); hashCode = (hashCode * 397) ^ IsHorizontalMouseWheel.GetHashCode(); hashCode = (hashCode * 397) ^ IsInRange.GetHashCode(); hashCode = (hashCode * 397) ^ IsInverted.GetHashCode(); hashCode = (hashCode * 397) ^ IsLeftButtonPressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsMiddleButtonPressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsRightButtonPressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsXButton1Pressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsXButton2Pressed.GetHashCode(); hashCode = (hashCode * 397) ^ IsPrimary.GetHashCode(); hashCode = (hashCode * 397) ^ MouseWheelDelta; hashCode = (hashCode * 397) ^ Orientation.GetHashCode(); hashCode = (hashCode * 397) ^ TouchConfidence.GetHashCode(); hashCode = (hashCode * 397) ^ Twist.GetHashCode(); hashCode = (hashCode * 397) ^ XTilt.GetHashCode(); hashCode = (hashCode * 397) ^ YTilt.GetHashCode(); hashCode = (hashCode * 397) ^ (int)PointerUpdateKind; return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Returns HashCode</returns> public override int GetHashCode() { return(String.Format("{0}|{1}|{2}", Name?.GetHashCode() ?? 0, IsInverted.GetHashCode(), Palette?.GetHashCode() ?? 0 ).GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Returns HashCode</returns> public override int GetHashCode() { return(string.Format("{0}|{1}|{2}|{3}", Name?.GetHashCode() ?? 0, IsInverted.GetHashCode(), Palette?.GetHashCode() ?? 0, Overwrite.GetHashCode() ).GetHashCode()); }