コード例 #1
0
ファイル: Cells.cs プロジェクト: valu8/Plotly.Blazor
 /// <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);
     }
 }
コード例 #2
0
ファイル: Cells.cs プロジェクト: valu8/Plotly.Blazor
        /// <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)
                 ));
        }