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); } }
public override int GetHashCode() { int hash = 1; if (amount_ != null) { hash ^= Amount.GetHashCode(); } if (IsCanceled != false) { hash ^= IsCanceled.GetHashCode(); } if (PaymentType != 0) { hash ^= PaymentType.GetHashCode(); } if (receivedBy_ != null) { hash ^= ReceivedBy.GetHashCode(); } if (postedAt_ != null) { hash ^= PostedAt.GetHashCode(); } if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; // Suitable nullity checks etc, of course :) if (IsCanceled != null) { hashCode = hashCode * 59 + IsCanceled.GetHashCode(); } if (IsError != null) { hashCode = hashCode * 59 + IsError.GetHashCode(); } if (ErrorCode != null) { hashCode = hashCode * 59 + ErrorCode.GetHashCode(); } if (AccessToken != null) { hashCode = hashCode * 59 + AccessToken.GetHashCode(); } if (IdToken != null) { hashCode = hashCode * 59 + IdToken.GetHashCode(); } if (Scopes != null) { hashCode = hashCode * 59 + Scopes.GetHashCode(); } if (ExpiresOn != null) { hashCode = hashCode * 59 + ExpiresOn.GetHashCode(); } return(hashCode); } }