public override int GetHashCode() { int hashCode = 808330583; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Point); hashCode = hashCode * -1521134295 + XShift.GetHashCode(); hashCode = hashCode * -1521134295 + YShift.GetHashCode(); hashCode = hashCode * -1521134295 + Scale.GetHashCode(); return(hashCode); }
/// <inheritdoc /> public bool Equals([AllowNull] Annotation other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( X == other.X || X != null && X.Equals(other.X) ) && ( Y == other.Y || Y != null && Y.Equals(other.Y) ) && ( Z == other.Z || Z != null && Z.Equals(other.Z) ) && ( Ax == other.Ax || Ax != null && Ax.Equals(other.Ax) ) && ( Ay == other.Ay || Ay != null && Ay.Equals(other.Ay) ) && ( XAnchor == other.XAnchor || XAnchor != null && XAnchor.Equals(other.XAnchor) ) && ( XShift == other.XShift || XShift != null && XShift.Equals(other.XShift) ) && ( YAnchor == other.YAnchor || YAnchor != null && YAnchor.Equals(other.YAnchor) ) && ( YShift == other.YShift || YShift != null && YShift.Equals(other.YShift) ) && ( Text == other.Text || Text != null && Text.Equals(other.Text) ) && ( TextAngle == other.TextAngle || TextAngle != null && TextAngle.Equals(other.TextAngle) ) && ( Font == other.Font || Font != null && Font.Equals(other.Font) ) && ( Width == other.Width || Width != null && Width.Equals(other.Width) ) && ( Height == other.Height || Height != null && Height.Equals(other.Height) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Align == other.Align || Align != null && Align.Equals(other.Align) ) && ( VAlign == other.VAlign || VAlign != null && VAlign.Equals(other.VAlign) ) && ( BgColor == other.BgColor || BgColor != null && BgColor.Equals(other.BgColor) ) && ( BorderColor == other.BorderColor || BorderColor != null && BorderColor.Equals(other.BorderColor) ) && ( BorderPad == other.BorderPad || BorderPad != null && BorderPad.Equals(other.BorderPad) ) && ( BorderWidth == other.BorderWidth || BorderWidth != null && BorderWidth.Equals(other.BorderWidth) ) && ( ShowArrow == other.ShowArrow || ShowArrow != null && ShowArrow.Equals(other.ShowArrow) ) && ( ArrowColor == other.ArrowColor || ArrowColor != null && ArrowColor.Equals(other.ArrowColor) ) && ( Arrowhead == other.Arrowhead || Arrowhead != null && Arrowhead.Equals(other.Arrowhead) ) && ( StartArrowhead == other.StartArrowhead || StartArrowhead != null && StartArrowhead.Equals(other.StartArrowhead) ) && ( ArrowSide == other.ArrowSide || ArrowSide != null && ArrowSide.Equals(other.ArrowSide) ) && ( ArrowSize == other.ArrowSize || ArrowSize != null && ArrowSize.Equals(other.ArrowSize) ) && ( StartArrowSize == other.StartArrowSize || StartArrowSize != null && StartArrowSize.Equals(other.StartArrowSize) ) && ( ArrowWidth == other.ArrowWidth || ArrowWidth != null && ArrowWidth.Equals(other.ArrowWidth) ) && ( Standoff == other.Standoff || Standoff != null && Standoff.Equals(other.Standoff) ) && ( StartStandoff == other.StartStandoff || StartStandoff != null && StartStandoff.Equals(other.StartStandoff) ) && ( HoverText == other.HoverText || HoverText != null && HoverText.Equals(other.HoverText) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( CaptureEvents == other.CaptureEvents || CaptureEvents != null && CaptureEvents.Equals(other.CaptureEvents) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( TemplateItemName == other.TemplateItemName || TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName) )); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (Y != null) { hashCode = hashCode * 59 + Y.GetHashCode(); } if (Z != null) { hashCode = hashCode * 59 + Z.GetHashCode(); } if (Ax != null) { hashCode = hashCode * 59 + Ax.GetHashCode(); } if (Ay != null) { hashCode = hashCode * 59 + Ay.GetHashCode(); } if (XAnchor != null) { hashCode = hashCode * 59 + XAnchor.GetHashCode(); } if (XShift != null) { hashCode = hashCode * 59 + XShift.GetHashCode(); } if (YAnchor != null) { hashCode = hashCode * 59 + YAnchor.GetHashCode(); } if (YShift != null) { hashCode = hashCode * 59 + YShift.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextAngle != null) { hashCode = hashCode * 59 + TextAngle.GetHashCode(); } if (Font != null) { hashCode = hashCode * 59 + Font.GetHashCode(); } if (Width != null) { hashCode = hashCode * 59 + Width.GetHashCode(); } if (Height != null) { hashCode = hashCode * 59 + Height.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Align != null) { hashCode = hashCode * 59 + Align.GetHashCode(); } if (VAlign != null) { hashCode = hashCode * 59 + VAlign.GetHashCode(); } if (BgColor != null) { hashCode = hashCode * 59 + BgColor.GetHashCode(); } if (BorderColor != null) { hashCode = hashCode * 59 + BorderColor.GetHashCode(); } if (BorderPad != null) { hashCode = hashCode * 59 + BorderPad.GetHashCode(); } if (BorderWidth != null) { hashCode = hashCode * 59 + BorderWidth.GetHashCode(); } if (ShowArrow != null) { hashCode = hashCode * 59 + ShowArrow.GetHashCode(); } if (ArrowColor != null) { hashCode = hashCode * 59 + ArrowColor.GetHashCode(); } if (Arrowhead != null) { hashCode = hashCode * 59 + Arrowhead.GetHashCode(); } if (StartArrowhead != null) { hashCode = hashCode * 59 + StartArrowhead.GetHashCode(); } if (ArrowSide != null) { hashCode = hashCode * 59 + ArrowSide.GetHashCode(); } if (ArrowSize != null) { hashCode = hashCode * 59 + ArrowSize.GetHashCode(); } if (StartArrowSize != null) { hashCode = hashCode * 59 + StartArrowSize.GetHashCode(); } if (ArrowWidth != null) { hashCode = hashCode * 59 + ArrowWidth.GetHashCode(); } if (Standoff != null) { hashCode = hashCode * 59 + Standoff.GetHashCode(); } if (StartStandoff != null) { hashCode = hashCode * 59 + StartStandoff.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (CaptureEvents != null) { hashCode = hashCode * 59 + CaptureEvents.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (TemplateItemName != null) { hashCode = hashCode * 59 + TemplateItemName.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Annotation other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) && (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) && (TextAngle == other.TextAngle && TextAngle != null && other.TextAngle != null && TextAngle.Equals(other.TextAngle)) && (Font == other.Font && Font != null && other.Font != null && Font.Equals(other.Font)) && (Width == other.Width && Width != null && other.Width != null && Width.Equals(other.Width)) && (Height == other.Height && Height != null && other.Height != null && Height.Equals(other.Height)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Align == other.Align && Align != null && other.Align != null && Align.Equals(other.Align)) && (VAlign == other.VAlign && VAlign != null && other.VAlign != null && VAlign.Equals(other.VAlign)) && (BgColor == other.BgColor && BgColor != null && other.BgColor != null && BgColor.Equals(other.BgColor)) && (BorderColor == other.BorderColor && BorderColor != null && other.BorderColor != null && BorderColor.Equals(other.BorderColor)) && (BorderPad == other.BorderPad && BorderPad != null && other.BorderPad != null && BorderPad.Equals(other.BorderPad)) && (BorderWidth == other.BorderWidth && BorderWidth != null && other.BorderWidth != null && BorderWidth.Equals(other.BorderWidth)) && (ShowArrow == other.ShowArrow && ShowArrow != null && other.ShowArrow != null && ShowArrow.Equals(other.ShowArrow)) && (ArrowColor == other.ArrowColor && ArrowColor != null && other.ArrowColor != null && ArrowColor.Equals(other.ArrowColor)) && (Arrowhead == other.Arrowhead && Arrowhead != null && other.Arrowhead != null && Arrowhead.Equals(other.Arrowhead)) && (StartArrowhead == other.StartArrowhead && StartArrowhead != null && other.StartArrowhead != null && StartArrowhead.Equals(other.StartArrowhead)) && (ArrowSide == other.ArrowSide && ArrowSide != null && other.ArrowSide != null && ArrowSide.Equals(other.ArrowSide)) && (ArrowSize == other.ArrowSize && ArrowSize != null && other.ArrowSize != null && ArrowSize.Equals(other.ArrowSize)) && (StartArrowSize == other.StartArrowSize && StartArrowSize != null && other.StartArrowSize != null && StartArrowSize.Equals(other.StartArrowSize)) && (ArrowWidth == other.ArrowWidth && ArrowWidth != null && other.ArrowWidth != null && ArrowWidth.Equals(other.ArrowWidth)) && (Standoff == other.Standoff && Standoff != null && other.Standoff != null && Standoff.Equals(other.Standoff)) && (StartStandoff == other.StartStandoff && StartStandoff != null && other.StartStandoff != null && StartStandoff.Equals(other.StartStandoff)) && (Ax == other.Ax && Ax != null && other.Ax != null && Ax.Equals(other.Ax)) && (Ay == other.Ay && Ay != null && other.Ay != null && Ay.Equals(other.Ay)) && (AXref == other.AXref && AXref != null && other.AXref != null && AXref.Equals(other.AXref)) && (AyRef == other.AyRef && AyRef != null && other.AyRef != null && AyRef.Equals(other.AyRef)) && (XRef == other.XRef && XRef != null && other.XRef != null && XRef.Equals(other.XRef)) && (X == other.X && X != null && other.X != null && X.Equals(other.X)) && (XAnchor == other.XAnchor && XAnchor != null && other.XAnchor != null && XAnchor.Equals(other.XAnchor)) && (XShift == other.XShift && XShift != null && other.XShift != null && XShift.Equals(other.XShift)) && (YRef == other.YRef && YRef != null && other.YRef != null && YRef.Equals(other.YRef)) && (Y == other.Y && Y != null && other.Y != null && Y.Equals(other.Y)) && (YAnchor == other.YAnchor && YAnchor != null && other.YAnchor != null && YAnchor.Equals(other.YAnchor)) && (YShift == other.YShift && YShift != null && other.YShift != null && YShift.Equals(other.YShift)) && (ClickToShow == other.ClickToShow && ClickToShow != null && other.ClickToShow != null && ClickToShow.Equals(other.ClickToShow)) && (XClick == other.XClick && XClick != null && other.XClick != null && XClick.Equals(other.XClick)) && (YClick == other.YClick && YClick != null && other.YClick != null && YClick.Equals(other.YClick)) && (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) && (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) && (CaptureEvents == other.CaptureEvents && CaptureEvents != null && other.CaptureEvents != null && CaptureEvents.Equals(other.CaptureEvents)) && (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) && (TemplateItemName == other.TemplateItemName && TemplateItemName != null && other.TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName))); }