예제 #1
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Groups != null)
         {
             hashCode = hashCode * 59 + Groups.GetHashCode();
         }
         if (X != null)
         {
             hashCode = hashCode * 59 + X.GetHashCode();
         }
         if (Y != null)
         {
             hashCode = hashCode * 59 + Y.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (ColorArray != null)
         {
             hashCode = hashCode * 59 + ColorArray.GetHashCode();
         }
         if (CustomData != null)
         {
             hashCode = hashCode * 59 + CustomData.GetHashCode();
         }
         if (Line != null)
         {
             hashCode = hashCode * 59 + Line.GetHashCode();
         }
         if (Pad != null)
         {
             hashCode = hashCode * 59 + Pad.GetHashCode();
         }
         if (Thickness != null)
         {
             hashCode = hashCode * 59 + Thickness.GetHashCode();
         }
         if (HoverInfo != null)
         {
             hashCode = hashCode * 59 + HoverInfo.GetHashCode();
         }
         if (HoverLabel != null)
         {
             hashCode = hashCode * 59 + HoverLabel.GetHashCode();
         }
         if (HoverTemplate != null)
         {
             hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
         }
         if (HoverTemplateArray != null)
         {
             hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
         }
         if (LabelSrc != null)
         {
             hashCode = hashCode * 59 + LabelSrc.GetHashCode();
         }
         if (XSrc != null)
         {
             hashCode = hashCode * 59 + XSrc.GetHashCode();
         }
         if (YSrc != null)
         {
             hashCode = hashCode * 59 + YSrc.GetHashCode();
         }
         if (ColorSrc != null)
         {
             hashCode = hashCode * 59 + ColorSrc.GetHashCode();
         }
         if (CustomDataSrc != null)
         {
             hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
         }
         if (HoverTemplateSrc != null)
         {
             hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
파일: Link.cs 프로젝트: valu8/Plotly.Blazor
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (ColorArray != null)
         {
             hashCode = hashCode * 59 + ColorArray.GetHashCode();
         }
         if (CustomData != null)
         {
             hashCode = hashCode * 59 + CustomData.GetHashCode();
         }
         if (Line != null)
         {
             hashCode = hashCode * 59 + Line.GetHashCode();
         }
         if (Source != null)
         {
             hashCode = hashCode * 59 + Source.GetHashCode();
         }
         if (Target != null)
         {
             hashCode = hashCode * 59 + Target.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (HoverInfo != null)
         {
             hashCode = hashCode * 59 + HoverInfo.GetHashCode();
         }
         if (HoverLabel != null)
         {
             hashCode = hashCode * 59 + HoverLabel.GetHashCode();
         }
         if (HoverTemplate != null)
         {
             hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
         }
         if (HoverTemplateArray != null)
         {
             hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
         }
         if (ColorScales != null)
         {
             hashCode = hashCode * 59 + ColorScales.GetHashCode();
         }
         if (LabelSrc != null)
         {
             hashCode = hashCode * 59 + LabelSrc.GetHashCode();
         }
         if (ColorSrc != null)
         {
             hashCode = hashCode * 59 + ColorSrc.GetHashCode();
         }
         if (CustomDataSrc != null)
         {
             hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
         }
         if (SourceSrc != null)
         {
             hashCode = hashCode * 59 + SourceSrc.GetHashCode();
         }
         if (TargetSrc != null)
         {
             hashCode = hashCode * 59 + TargetSrc.GetHashCode();
         }
         if (ValueSrc != null)
         {
             hashCode = hashCode * 59 + ValueSrc.GetHashCode();
         }
         if (HoverTemplateSrc != null)
         {
             hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #3
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Node other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Equals(Label, other.Label) ||
                     Label != null && other.Label != null &&
                     Label.SequenceEqual(other.Label)
                     ) &&
                 (
                     Equals(Groups, other.Groups) ||
                     Groups != null && other.Groups != null &&
                     Groups.SequenceEqual(other.Groups)
                 ) &&
                 (
                     Equals(X, other.X) ||
                     X != null && other.X != null &&
                     X.SequenceEqual(other.X)
                 ) &&
                 (
                     Equals(Y, other.Y) ||
                     Y != null && other.Y != null &&
                     Y.SequenceEqual(other.Y)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     Equals(ColorArray, other.ColorArray) ||
                     ColorArray != null && other.ColorArray != null &&
                     ColorArray.SequenceEqual(other.ColorArray)
                 ) &&
                 (
                     Equals(CustomData, other.CustomData) ||
                     CustomData != null && other.CustomData != null &&
                     CustomData.SequenceEqual(other.CustomData)
                 ) &&
                 (
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                 ) &&
                 (
                     Pad == other.Pad ||
                     Pad != null &&
                     Pad.Equals(other.Pad)
                 ) &&
                 (
                     Thickness == other.Thickness ||
                     Thickness != null &&
                     Thickness.Equals(other.Thickness)
                 ) &&
                 (
                     HoverInfo == other.HoverInfo ||
                     HoverInfo != null &&
                     HoverInfo.Equals(other.HoverInfo)
                 ) &&
                 (
                     HoverLabel == other.HoverLabel ||
                     HoverLabel != null &&
                     HoverLabel.Equals(other.HoverLabel)
                 ) &&
                 (
                     HoverTemplate == other.HoverTemplate ||
                     HoverTemplate != null &&
                     HoverTemplate.Equals(other.HoverTemplate)
                 ) &&
                 (
                     Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                     HoverTemplateArray != null && other.HoverTemplateArray != null &&
                     HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)
                 ) &&
                 (
                     LabelSrc == other.LabelSrc ||
                     LabelSrc != null &&
                     LabelSrc.Equals(other.LabelSrc)
                 ) &&
                 (
                     XSrc == other.XSrc ||
                     XSrc != null &&
                     XSrc.Equals(other.XSrc)
                 ) &&
                 (
                     YSrc == other.YSrc ||
                     YSrc != null &&
                     YSrc.Equals(other.YSrc)
                 ) &&
                 (
                     ColorSrc == other.ColorSrc ||
                     ColorSrc != null &&
                     ColorSrc.Equals(other.ColorSrc)
                 ) &&
                 (
                     CustomDataSrc == other.CustomDataSrc ||
                     CustomDataSrc != null &&
                     CustomDataSrc.Equals(other.CustomDataSrc)
                 ) &&
                 (
                     HoverTemplateSrc == other.HoverTemplateSrc ||
                     HoverTemplateSrc != null &&
                     HoverTemplateSrc.Equals(other.HoverTemplateSrc)
                 ));
        }
예제 #4
0
파일: Link.cs 프로젝트: valu8/Plotly.Blazor
        /// <inheritdoc />
        public bool Equals([AllowNull] Link other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Equals(Label, other.Label) ||
                     Label != null && other.Label != null &&
                     Label.SequenceEqual(other.Label)
                     ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     Equals(ColorArray, other.ColorArray) ||
                     ColorArray != null && other.ColorArray != null &&
                     ColorArray.SequenceEqual(other.ColorArray)
                 ) &&
                 (
                     Equals(CustomData, other.CustomData) ||
                     CustomData != null && other.CustomData != null &&
                     CustomData.SequenceEqual(other.CustomData)
                 ) &&
                 (
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                 ) &&
                 (
                     Equals(Source, other.Source) ||
                     Source != null && other.Source != null &&
                     Source.SequenceEqual(other.Source)
                 ) &&
                 (
                     Equals(Target, other.Target) ||
                     Target != null && other.Target != null &&
                     Target.SequenceEqual(other.Target)
                 ) &&
                 (
                     Equals(Value, other.Value) ||
                     Value != null && other.Value != null &&
                     Value.SequenceEqual(other.Value)
                 ) &&
                 (
                     HoverInfo == other.HoverInfo ||
                     HoverInfo != null &&
                     HoverInfo.Equals(other.HoverInfo)
                 ) &&
                 (
                     HoverLabel == other.HoverLabel ||
                     HoverLabel != null &&
                     HoverLabel.Equals(other.HoverLabel)
                 ) &&
                 (
                     HoverTemplate == other.HoverTemplate ||
                     HoverTemplate != null &&
                     HoverTemplate.Equals(other.HoverTemplate)
                 ) &&
                 (
                     Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                     HoverTemplateArray != null && other.HoverTemplateArray != null &&
                     HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)
                 ) &&
                 (
                     Equals(ColorScales, other.ColorScales) ||
                     ColorScales != null && other.ColorScales != null &&
                     ColorScales.SequenceEqual(other.ColorScales)
                 ) &&
                 (
                     LabelSrc == other.LabelSrc ||
                     LabelSrc != null &&
                     LabelSrc.Equals(other.LabelSrc)
                 ) &&
                 (
                     ColorSrc == other.ColorSrc ||
                     ColorSrc != null &&
                     ColorSrc.Equals(other.ColorSrc)
                 ) &&
                 (
                     CustomDataSrc == other.CustomDataSrc ||
                     CustomDataSrc != null &&
                     CustomDataSrc.Equals(other.CustomDataSrc)
                 ) &&
                 (
                     SourceSrc == other.SourceSrc ||
                     SourceSrc != null &&
                     SourceSrc.Equals(other.SourceSrc)
                 ) &&
                 (
                     TargetSrc == other.TargetSrc ||
                     TargetSrc != null &&
                     TargetSrc.Equals(other.TargetSrc)
                 ) &&
                 (
                     ValueSrc == other.ValueSrc ||
                     ValueSrc != null &&
                     ValueSrc.Equals(other.ValueSrc)
                 ) &&
                 (
                     HoverTemplateSrc == other.HoverTemplateSrc ||
                     HoverTemplateSrc != null &&
                     HoverTemplateSrc.Equals(other.HoverTemplateSrc)
                 ));
        }