public override int GetHashCode() { int hash = 1; if (X1 != 0) { hash ^= X1.GetHashCode(); } if (Y1 != 0) { hash ^= Y1.GetHashCode(); } if (X2 != 0) { hash ^= X2.GetHashCode(); } if (Y2 != 0) { hash ^= Y2.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.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; 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); } }
public static void DifferentObjectTypesHaveDifferentHashes() { var x = new X1(); var y = new X2(); Assert.NotEqual(x.GetHashCode(), y.GetHashCode()); }
public override int GetHashCode() { var hashCode = 1001978625; hashCode = hashCode * -1521134295 + X1.GetHashCode(); hashCode = hashCode * -1521134295 + X2.GetHashCode(); return(hashCode); }
public override int GetHashCode() { var hashCode = 1280913280; hashCode = hashCode * -1521134295 + X1.GetHashCode(); hashCode = hashCode * -1521134295 + X2.GetHashCode(); hashCode = hashCode * -1521134295; return(hashCode); }
public override int GetHashCode() { var hashCode = 1982840186; hashCode = hashCode * -1521134295 + X1.GetHashCode(); hashCode = hashCode * -1521134295 + X2.GetHashCode(); hashCode = hashCode * -1521134295 + Y1.GetHashCode(); hashCode = hashCode * -1521134295 + Y2.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { int hashCode = X1.GetHashCode(); hashCode = (hashCode * 397) ^ X2.GetHashCode(); hashCode = (hashCode * 397) ^ X3.GetHashCode(); return(hashCode); } }
/// <summary> /// Gets the hash code for this <see cref='AbsoluteGraphicsPlatform.Metrics.AbsoluteLine'/>. /// </summary> public override int GetHashCode() { unchecked { return (29 * 17 * X1.GetHashCode() * 17 * Y1.GetHashCode() * 17 * X2.GetHashCode() * 17 * Y2.GetHashCode()); } }
public override int GetHashCode() { int prime = 37; int hash = 1; hash = prime * hash + X1.GetHashCode(); hash = prime * hash + X2.GetHashCode(); hash = prime * hash + X3.GetHashCode(); hash = prime * hash + Y1.GetHashCode(); hash = prime * hash + Y2.GetHashCode(); return(prime * hash + Y3.GetHashCode()); }
public override int GetHashCode() { var prime = 37; var hash = 1; hash = prime * hash + X1.GetHashCode(); hash = prime * hash + Y1.GetHashCode(); hash = prime * hash + X2.GetHashCode(); hash = prime * hash + Y2.GetHashCode(); hash = prime * hash + X3.GetHashCode(); hash = prime * hash + Y3.GetHashCode(); return(hash); }
public override int GetHashCode() { var hashCode = 0; unchecked { hashCode += 1000000007 * X1.GetHashCode(); hashCode += 1000000009 * Y1.GetHashCode(); hashCode += 1000000021 * Width.GetHashCode(); hashCode += 1000000033 * Height.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { unchecked { // properties are, practically, readonly // ReSharper disable NonReadonlyMemberInGetHashCode var hashCode = X1.GetHashCode(); hashCode = (hashCode * 397) ^ Y1.GetHashCode(); hashCode = (hashCode * 397) ^ X2.GetHashCode(); hashCode = (hashCode * 397) ^ Y2.GetHashCode(); return(hashCode); // ReSharper restore NonReadonlyMemberInGetHashCode } }
public override int GetHashCode() { return(X1.GetHashCode()); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Layer != null) { hashCode = hashCode * 59 + Layer.GetHashCode(); } if (XRef != null) { hashCode = hashCode * 59 + XRef.GetHashCode(); } if (XSizeMode != null) { hashCode = hashCode * 59 + XSizeMode.GetHashCode(); } if (XAnchor != null) { hashCode = hashCode * 59 + XAnchor.GetHashCode(); } if (X0 != null) { hashCode = hashCode * 59 + X0.GetHashCode(); } if (X1 != null) { hashCode = hashCode * 59 + X1.GetHashCode(); } if (YRef != null) { hashCode = hashCode * 59 + YRef.GetHashCode(); } if (YSizeMode != null) { hashCode = hashCode * 59 + YSizeMode.GetHashCode(); } if (YAnchor != null) { hashCode = hashCode * 59 + YAnchor.GetHashCode(); } if (Y0 != null) { hashCode = hashCode * 59 + Y0.GetHashCode(); } if (Y1 != null) { hashCode = hashCode * 59 + Y1.GetHashCode(); } if (Path != null) { hashCode = hashCode * 59 + Path.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (FillColor != null) { hashCode = hashCode * 59 + FillColor.GetHashCode(); } if (FillRule != null) { hashCode = hashCode * 59 + FillRule.GetHashCode(); } if (Editable != null) { hashCode = hashCode * 59 + Editable.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (TemplateItemName != null) { hashCode = hashCode * 59 + TemplateItemName.GetHashCode(); } return(hashCode); } }
/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { return(X1.GetHashCode() ^ 1 + Y1.GetHashCode() ^ 2 + X2.GetHashCode() ^ 3 + Y2.GetHashCode()); }
public static void IdenticalObjectsHavSameHashStruct() { var x = new X1(); Assert.Equal(x.GetHashCode(), x.GetHashCode()); }
public override int GetHashCode() { return(X1.GetHashCode() + X2.GetHashCode() + X3.GetHashCode() + Y1.GetHashCode() + Y2.GetHashCode() + Y3.GetHashCode()); }