Exemple #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 (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);
     }
 }
Exemple #2
0
        /// <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)
                 ));
        }