Пример #1
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (BgColor != null)
         {
             hashCode = hashCode * 59 + BgColor.GetHashCode();
         }
         if (BgColorArray != null)
         {
             hashCode = hashCode * 59 + BgColorArray.GetHashCode();
         }
         if (BorderColor != null)
         {
             hashCode = hashCode * 59 + BorderColor.GetHashCode();
         }
         if (BorderColorArray != null)
         {
             hashCode = hashCode * 59 + BorderColorArray.GetHashCode();
         }
         if (Font != null)
         {
             hashCode = hashCode * 59 + Font.GetHashCode();
         }
         if (Align != null)
         {
             hashCode = hashCode * 59 + Align.GetHashCode();
         }
         if (AlignArray != null)
         {
             hashCode = hashCode * 59 + AlignArray.GetHashCode();
         }
         if (NameLength != null)
         {
             hashCode = hashCode * 59 + NameLength.GetHashCode();
         }
         if (NameLengthArray != null)
         {
             hashCode = hashCode * 59 + NameLengthArray.GetHashCode();
         }
         if (BgColorSrc != null)
         {
             hashCode = hashCode * 59 + BgColorSrc.GetHashCode();
         }
         if (BorderColorSrc != null)
         {
             hashCode = hashCode * 59 + BorderColorSrc.GetHashCode();
         }
         if (AlignSrc != null)
         {
             hashCode = hashCode * 59 + AlignSrc.GetHashCode();
         }
         if (NameLengthSrc != null)
         {
             hashCode = hashCode * 59 + NameLengthSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #2
0
        public bool Equals([AllowNull] HoverLabel other)
        {
            if (other == null)
            {
                return(false);
            }

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

            return((BgColor == other.BgColor && BgColor != null && other.BgColor != null && BgColor.Equals(other.BgColor)) &&
                   (Equals(BgColorArray, other.BgColorArray) || BgColorArray != null && other.BgColorArray != null && BgColorArray.SequenceEqual(other.BgColorArray)) &&
                   (BorderColor == other.BorderColor && BorderColor != null && other.BorderColor != null && BorderColor.Equals(other.BorderColor)) &&
                   (Equals(BorderColorArray, other.BorderColorArray) || BorderColorArray != null && other.BorderColorArray != null && BorderColorArray.SequenceEqual(other.BorderColorArray)) &&
                   (Font == other.Font && Font != null && other.Font != null && Font.Equals(other.Font)) &&
                   (Align == other.Align && Align != null && other.Align != null && Align.Equals(other.Align)) &&
                   (Equals(AlignArray, other.AlignArray) || AlignArray != null && other.AlignArray != null && AlignArray.SequenceEqual(other.AlignArray)) &&
                   (NameLength == other.NameLength && NameLength != null && other.NameLength != null && NameLength.Equals(other.NameLength)) &&
                   (Equals(NameLengthArray, other.NameLengthArray) || NameLengthArray != null && other.NameLengthArray != null && NameLengthArray.SequenceEqual(other.NameLengthArray)) &&
                   (BgColorSrc == other.BgColorSrc && BgColorSrc != null && other.BgColorSrc != null && BgColorSrc.Equals(other.BgColorSrc)) &&
                   (BorderColorSrc == other.BorderColorSrc && BorderColorSrc != null && other.BorderColorSrc != null && BorderColorSrc.Equals(other.BorderColorSrc)) &&
                   (AlignSrc == other.AlignSrc && AlignSrc != null && other.AlignSrc != null && AlignSrc.Equals(other.AlignSrc)) &&
                   (NameLengthSrc == other.NameLengthSrc && NameLengthSrc != null && other.NameLengthSrc != null && NameLengthSrc.Equals(other.NameLengthSrc)));
        }
Пример #3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Values != null)
         {
             hashCode = hashCode * 59 + Values.GetHashCode();
         }
         if (Format != null)
         {
             hashCode = hashCode * 59 + Format.GetHashCode();
         }
         if (Prefix != null)
         {
             hashCode = hashCode * 59 + Prefix.GetHashCode();
         }
         if (PrefixArray != null)
         {
             hashCode = hashCode * 59 + PrefixArray.GetHashCode();
         }
         if (Suffix != null)
         {
             hashCode = hashCode * 59 + Suffix.GetHashCode();
         }
         if (SuffixArray != null)
         {
             hashCode = hashCode * 59 + SuffixArray.GetHashCode();
         }
         if (Height != null)
         {
             hashCode = hashCode * 59 + Height.GetHashCode();
         }
         if (Align != null)
         {
             hashCode = hashCode * 59 + Align.GetHashCode();
         }
         if (AlignArray != null)
         {
             hashCode = hashCode * 59 + AlignArray.GetHashCode();
         }
         if (Line != null)
         {
             hashCode = hashCode * 59 + Line.GetHashCode();
         }
         if (Fill != null)
         {
             hashCode = hashCode * 59 + Fill.GetHashCode();
         }
         if (Font != null)
         {
             hashCode = hashCode * 59 + Font.GetHashCode();
         }
         if (ValuesSrc != null)
         {
             hashCode = hashCode * 59 + ValuesSrc.GetHashCode();
         }
         if (FormatSrc != null)
         {
             hashCode = hashCode * 59 + FormatSrc.GetHashCode();
         }
         if (PrefixSrc != null)
         {
             hashCode = hashCode * 59 + PrefixSrc.GetHashCode();
         }
         if (SuffixSrc != null)
         {
             hashCode = hashCode * 59 + SuffixSrc.GetHashCode();
         }
         if (AlignSrc != null)
         {
             hashCode = hashCode * 59 + AlignSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #4
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Cells other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Equals(Values, other.Values) ||
                     Values != null && other.Values != null &&
                     Values.SequenceEqual(other.Values)
                     ) &&
                 (
                     Equals(Format, other.Format) ||
                     Format != null && other.Format != null &&
                     Format.SequenceEqual(other.Format)
                 ) &&
                 (
                     Prefix == other.Prefix ||
                     Prefix != null &&
                     Prefix.Equals(other.Prefix)
                 ) &&
                 (
                     Equals(PrefixArray, other.PrefixArray) ||
                     PrefixArray != null && other.PrefixArray != null &&
                     PrefixArray.SequenceEqual(other.PrefixArray)
                 ) &&
                 (
                     Suffix == other.Suffix ||
                     Suffix != null &&
                     Suffix.Equals(other.Suffix)
                 ) &&
                 (
                     Equals(SuffixArray, other.SuffixArray) ||
                     SuffixArray != null && other.SuffixArray != null &&
                     SuffixArray.SequenceEqual(other.SuffixArray)
                 ) &&
                 (
                     Height == other.Height ||
                     Height != null &&
                     Height.Equals(other.Height)
                 ) &&
                 (
                     Align == other.Align ||
                     Align != null &&
                     Align.Equals(other.Align)
                 ) &&
                 (
                     Equals(AlignArray, other.AlignArray) ||
                     AlignArray != null && other.AlignArray != null &&
                     AlignArray.SequenceEqual(other.AlignArray)
                 ) &&
                 (
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                 ) &&
                 (
                     Fill == other.Fill ||
                     Fill != null &&
                     Fill.Equals(other.Fill)
                 ) &&
                 (
                     Font == other.Font ||
                     Font != null &&
                     Font.Equals(other.Font)
                 ) &&
                 (
                     ValuesSrc == other.ValuesSrc ||
                     ValuesSrc != null &&
                     ValuesSrc.Equals(other.ValuesSrc)
                 ) &&
                 (
                     FormatSrc == other.FormatSrc ||
                     FormatSrc != null &&
                     FormatSrc.Equals(other.FormatSrc)
                 ) &&
                 (
                     PrefixSrc == other.PrefixSrc ||
                     PrefixSrc != null &&
                     PrefixSrc.Equals(other.PrefixSrc)
                 ) &&
                 (
                     SuffixSrc == other.SuffixSrc ||
                     SuffixSrc != null &&
                     SuffixSrc.Equals(other.SuffixSrc)
                 ) &&
                 (
                     AlignSrc == other.AlignSrc ||
                     AlignSrc != null &&
                     AlignSrc.Equals(other.AlignSrc)
                 ));
        }