Example #1
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Show != null)
         {
             hashCode = hashCode * 59 + Show.GetHashCode();
         }
         if (Start != null)
         {
             hashCode = hashCode * 59 + Start.GetHashCode();
         }
         if (End != null)
         {
             hashCode = hashCode * 59 + End.GetHashCode();
         }
         if (Size != null)
         {
             hashCode = hashCode * 59 + Size.GetHashCode();
         }
         if (Project != null)
         {
             hashCode = hashCode * 59 + Project.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (UseColorMap != null)
         {
             hashCode = hashCode * 59 + UseColorMap.GetHashCode();
         }
         if (Width != null)
         {
             hashCode = hashCode * 59 + Width.GetHashCode();
         }
         if (Highlight != null)
         {
             hashCode = hashCode * 59 + Highlight.GetHashCode();
         }
         if (HighlightColor != null)
         {
             hashCode = hashCode * 59 + HighlightColor.GetHashCode();
         }
         if (HighlightWidth != null)
         {
             hashCode = hashCode * 59 + HighlightWidth.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #2
0
        public bool Equals([AllowNull] Y other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Show == other.Show && Show != null && other.Show != null && Show.Equals(other.Show)) &&
                   (Start == other.Start && Start != null && other.Start != null && Start.Equals(other.Start)) &&
                   (End == other.End && End != null && other.End != null && End.Equals(other.End)) &&
                   (Size == other.Size && Size != null && other.Size != null && Size.Equals(other.Size)) &&
                   (Project == other.Project && Project != null && other.Project != null && Project.Equals(other.Project)) &&
                   (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) &&
                   (UseColorMap == other.UseColorMap && UseColorMap != null && other.UseColorMap != null && UseColorMap.Equals(other.UseColorMap)) &&
                   (Width == other.Width && Width != null && other.Width != null && Width.Equals(other.Width)) &&
                   (Highlight == other.Highlight && Highlight != null && other.Highlight != null && Highlight.Equals(other.Highlight)) &&
                   (HighlightColor == other.HighlightColor && HighlightColor != null && other.HighlightColor != null && HighlightColor.Equals(other.HighlightColor)) &&
                   (HighlightWidth == other.HighlightWidth && HighlightWidth != null && other.HighlightWidth != null && HighlightWidth.Equals(other.HighlightWidth)));
        }