Esempio n. 1
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Visible != null)
         {
             hashCode = hashCode * 59 + Visible.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Symmetric != null)
         {
             hashCode = hashCode * 59 + Symmetric.GetHashCode();
         }
         if (Array != null)
         {
             hashCode = hashCode * 59 + Array.GetHashCode();
         }
         if (ArrayMinus != null)
         {
             hashCode = hashCode * 59 + ArrayMinus.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (ValueMinus != null)
         {
             hashCode = hashCode * 59 + ValueMinus.GetHashCode();
         }
         if (TraceRef != null)
         {
             hashCode = hashCode * 59 + TraceRef.GetHashCode();
         }
         if (TraceRefMinus != null)
         {
             hashCode = hashCode * 59 + TraceRefMinus.GetHashCode();
         }
         if (CopyZStyle != null)
         {
             hashCode = hashCode * 59 + CopyZStyle.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (Thickness != null)
         {
             hashCode = hashCode * 59 + Thickness.GetHashCode();
         }
         if (Width != null)
         {
             hashCode = hashCode * 59 + Width.GetHashCode();
         }
         if (ArraySrc != null)
         {
             hashCode = hashCode * 59 + ArraySrc.GetHashCode();
         }
         if (ArrayMinusSrc != null)
         {
             hashCode = hashCode * 59 + ArrayMinusSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 2
0
        /// <inheritdoc />
        public bool Equals([AllowNull] ErrorY other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                     ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Symmetric == other.Symmetric ||
                     Symmetric != null &&
                     Symmetric.Equals(other.Symmetric)
                 ) &&
                 (
                     Equals(Array, other.Array) ||
                     Array != null && other.Array != null &&
                     Array.SequenceEqual(other.Array)
                 ) &&
                 (
                     Equals(ArrayMinus, other.ArrayMinus) ||
                     ArrayMinus != null && other.ArrayMinus != null &&
                     ArrayMinus.SequenceEqual(other.ArrayMinus)
                 ) &&
                 (
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                 ) &&
                 (
                     ValueMinus == other.ValueMinus ||
                     ValueMinus != null &&
                     ValueMinus.Equals(other.ValueMinus)
                 ) &&
                 (
                     TraceRef == other.TraceRef ||
                     TraceRef != null &&
                     TraceRef.Equals(other.TraceRef)
                 ) &&
                 (
                     TraceRefMinus == other.TraceRefMinus ||
                     TraceRefMinus != null &&
                     TraceRefMinus.Equals(other.TraceRefMinus)
                 ) &&
                 (
                     CopyZStyle == other.CopyZStyle ||
                     CopyZStyle != null &&
                     CopyZStyle.Equals(other.CopyZStyle)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     Thickness == other.Thickness ||
                     Thickness != null &&
                     Thickness.Equals(other.Thickness)
                 ) &&
                 (
                     Width == other.Width ||
                     Width != null &&
                     Width.Equals(other.Width)
                 ) &&
                 (
                     ArraySrc == other.ArraySrc ||
                     ArraySrc != null &&
                     ArraySrc.Equals(other.ArraySrc)
                 ) &&
                 (
                     ArrayMinusSrc == other.ArrayMinusSrc ||
                     ArrayMinusSrc != null &&
                     ArrayMinusSrc.Equals(other.ArrayMinusSrc)
                 ));
        }