/// <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); } }
/// <inheritdoc /> public bool Equals([AllowNull] Shape 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) ) && ( Layer == other.Layer || Layer != null && Layer.Equals(other.Layer) ) && ( XRef == other.XRef || XRef != null && XRef.Equals(other.XRef) ) && ( XSizeMode == other.XSizeMode || XSizeMode != null && XSizeMode.Equals(other.XSizeMode) ) && ( XAnchor == other.XAnchor || XAnchor != null && XAnchor.Equals(other.XAnchor) ) && ( X0 == other.X0 || X0 != null && X0.Equals(other.X0) ) && ( X1 == other.X1 || X1 != null && X1.Equals(other.X1) ) && ( YRef == other.YRef || YRef != null && YRef.Equals(other.YRef) ) && ( YSizeMode == other.YSizeMode || YSizeMode != null && YSizeMode.Equals(other.YSizeMode) ) && ( YAnchor == other.YAnchor || YAnchor != null && YAnchor.Equals(other.YAnchor) ) && ( Y0 == other.Y0 || Y0 != null && Y0.Equals(other.Y0) ) && ( Y1 == other.Y1 || Y1 != null && Y1.Equals(other.Y1) ) && ( Path == other.Path || Path != null && Path.Equals(other.Path) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( FillColor == other.FillColor || FillColor != null && FillColor.Equals(other.FillColor) ) && ( FillRule == other.FillRule || FillRule != null && FillRule.Equals(other.FillRule) ) && ( Editable == other.Editable || Editable != null && Editable.Equals(other.Editable) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( TemplateItemName == other.TemplateItemName || TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName) )); }