コード例 #1
0
ファイル: ErrorX.cs プロジェクト: trmcnealy/Plotly.WPF
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int 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 (CopyYStyle != null)
                {
                    hashCode = hashCode * 59 + CopyYStyle.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);
            }
        }
コード例 #2
0
ファイル: ErrorX.cs プロジェクト: trmcnealy/Plotly.WPF
        public bool Equals([AllowNull] ErrorX other)
        {
            if (other == null)
            {
                return(false);
            }

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

            return((Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Symmetric == other.Symmetric && Symmetric != null && other.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 && other.Value != null && Value.Equals(other.Value)) &&
                   (ValueMinus == other.ValueMinus && ValueMinus != null && other.ValueMinus != null && ValueMinus.Equals(other.ValueMinus)) &&
                   (TraceRef == other.TraceRef && TraceRef != null && other.TraceRef != null && TraceRef.Equals(other.TraceRef)) &&
                   (TraceRefMinus == other.TraceRefMinus && TraceRefMinus != null && other.TraceRefMinus != null && TraceRefMinus.Equals(other.TraceRefMinus)) &&
                   (CopyYStyle == other.CopyYStyle && CopyYStyle != null && other.CopyYStyle != null && CopyYStyle.Equals(other.CopyYStyle)) &&
                   (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) &&
                   (Thickness == other.Thickness && Thickness != null && other.Thickness != null && Thickness.Equals(other.Thickness)) &&
                   (Width == other.Width && Width != null && other.Width != null && Width.Equals(other.Width)) &&
                   (ArraySrc == other.ArraySrc && ArraySrc != null && other.ArraySrc != null && ArraySrc.Equals(other.ArraySrc)) &&
                   (ArrayMinusSrc == other.ArrayMinusSrc && ArrayMinusSrc != null && other.ArrayMinusSrc != null && ArrayMinusSrc.Equals(other.ArrayMinusSrc)));
        }