Пример #1
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Range != null)
                {
                    hashCode = hashCode * 59 + Range.GetHashCode();
                }

                if (Domain != null)
                {
                    hashCode = hashCode * 59 + Domain.GetHashCode();
                }

                if (ShowLine != null)
                {
                    hashCode = hashCode * 59 + ShowLine.GetHashCode();
                }

                if (ShowTickLabels != null)
                {
                    hashCode = hashCode * 59 + ShowTickLabels.GetHashCode();
                }

                if (TickOrientation != null)
                {
                    hashCode = hashCode * 59 + TickOrientation.GetHashCode();
                }

                if (TickleN != null)
                {
                    hashCode = hashCode * 59 + TickleN.GetHashCode();
                }

                if (TickColor != null)
                {
                    hashCode = hashCode * 59 + TickColor.GetHashCode();
                }

                if (TickSuffix != null)
                {
                    hashCode = hashCode * 59 + TickSuffix.GetHashCode();
                }

                if (EndPadding != null)
                {
                    hashCode = hashCode * 59 + EndPadding.GetHashCode();
                }

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                return(hashCode);
            }
        }
Пример #2
0
        /// <inheritdoc />
        public bool Equals([AllowNull] AngularAxis other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Equals(Range, other.Range) ||
                     Range != null && other.Range != null &&
                     Range.SequenceEqual(other.Range)
                     ) &&
                 (
                     Equals(Domain, other.Domain) ||
                     Domain != null && other.Domain != null &&
                     Domain.SequenceEqual(other.Domain)
                 ) &&
                 (
                     ShowLine == other.ShowLine ||
                     ShowLine != null &&
                     ShowLine.Equals(other.ShowLine)
                 ) &&
                 (
                     ShowTickLabels == other.ShowTickLabels ||
                     ShowTickLabels != null &&
                     ShowTickLabels.Equals(other.ShowTickLabels)
                 ) &&
                 (
                     TickOrientation == other.TickOrientation ||
                     TickOrientation != null &&
                     TickOrientation.Equals(other.TickOrientation)
                 ) &&
                 (
                     TickleN == other.TickleN ||
                     TickleN != null &&
                     TickleN.Equals(other.TickleN)
                 ) &&
                 (
                     TickColor == other.TickColor ||
                     TickColor != null &&
                     TickColor.Equals(other.TickColor)
                 ) &&
                 (
                     TickSuffix == other.TickSuffix ||
                     TickSuffix != null &&
                     TickSuffix.Equals(other.TickSuffix)
                 ) &&
                 (
                     EndPadding == other.EndPadding ||
                     EndPadding != null &&
                     EndPadding.Equals(other.EndPadding)
                 ) &&
                 (
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                 ));
        }