PurplePen.ControlPoint.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (!(obj is ControlPoint))
                return false;

            ControlPoint other = (ControlPoint)obj;

            if (other.kind != kind)
                return false;
            if (other.code != code)
                return false;
            if (other.location != location)
                return false;
            if (other.orientation != orientation)
                return false;
            if (other.descriptionText != descriptionText)
                return false;
            if ((other.symbolIds == null || symbolIds == null)) {
                if (other.symbolIds != symbolIds)
                    return false;
            }
            else if (other.symbolIds.Length != symbolIds.Length)
                return false;
            else {
                for (int i = 0; i < symbolIds.Length; ++i)
                    if (other.symbolIds[i] != symbolIds[i])
                        return false;
            }
            if (other.columnFText != columnFText)
                return false;

            if (gaps == null && other.gaps != null)
                return false;
            if (gaps != null && other.gaps == null)
                return false;
            if (gaps != null) {
                if (gaps.Count != other.gaps.Count)
                    return false;
                foreach (int scale in gaps.Keys) {
                    if (!other.gaps.ContainsKey(scale) || ! Util.EqualArrays(other.gaps[scale], gaps[scale]))
                        return false;
                }
            }

            if (! object.Equals(other.punches, punches))
                return false;

            if (other.descTextBefore != descTextBefore)
                return false;
            if (other.descTextAfter != descTextAfter)
                return false;
            if (other.customCodeLocation != customCodeLocation)
                return false;
            if (other.codeLocationAngle != codeLocationAngle)
                return false;

            return true;
        }