/// <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 (Direction != null) { hashCode = hashCode * 59 + Direction.GetHashCode(); } if (Active != null) { hashCode = hashCode * 59 + Active.GetHashCode(); } if (ShowActive != null) { hashCode = hashCode * 59 + ShowActive.GetHashCode(); } if (Buttons != null) { hashCode = hashCode * 59 + Buttons.GetHashCode(); } if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (XAnchor != null) { hashCode = hashCode * 59 + XAnchor.GetHashCode(); } if (Y != null) { hashCode = hashCode * 59 + Y.GetHashCode(); } if (YAnchor != null) { hashCode = hashCode * 59 + YAnchor.GetHashCode(); } if (Pad != null) { hashCode = hashCode * 59 + Pad.GetHashCode(); } if (Font != null) { hashCode = hashCode * 59 + Font.GetHashCode(); } if (BgColor != null) { hashCode = hashCode * 59 + BgColor.GetHashCode(); } if (BorderColor != null) { hashCode = hashCode * 59 + BorderColor.GetHashCode(); } if (BorderWidth != null) { hashCode = hashCode * 59 + BorderWidth.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (TemplateItemName != null) { hashCode = hashCode * 59 + TemplateItemName.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { return(ShowActive.GetHashCode() ^ ShowInactive.GetHashCode() ^ ShowTimers.GetHashCode() ^ ShowAlarms.GetHashCode() ^ GroupNames.GetHashCode() ^ SearchString.GetHashCode()); }
/// <inheritdoc /> public bool Equals([AllowNull] UpdateMenu other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Direction == other.Direction || Direction != null && Direction.Equals(other.Direction) ) && ( Active == other.Active || Active != null && Active.Equals(other.Active) ) && ( ShowActive == other.ShowActive || ShowActive != null && ShowActive.Equals(other.ShowActive) ) && ( Equals(Buttons, other.Buttons) || Buttons != null && other.Buttons != null && Buttons.SequenceEqual(other.Buttons) ) && ( X == other.X || X != null && X.Equals(other.X) ) && ( XAnchor == other.XAnchor || XAnchor != null && XAnchor.Equals(other.XAnchor) ) && ( Y == other.Y || Y != null && Y.Equals(other.Y) ) && ( YAnchor == other.YAnchor || YAnchor != null && YAnchor.Equals(other.YAnchor) ) && ( Pad == other.Pad || Pad != null && Pad.Equals(other.Pad) ) && ( Font == other.Font || Font != null && Font.Equals(other.Font) ) && ( BgColor == other.BgColor || BgColor != null && BgColor.Equals(other.BgColor) ) && ( BorderColor == other.BorderColor || BorderColor != null && BorderColor.Equals(other.BorderColor) ) && ( BorderWidth == other.BorderWidth || BorderWidth != null && BorderWidth.Equals(other.BorderWidth) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( TemplateItemName == other.TemplateItemName || TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName) )); }