예제 #1
0
        public override bool Equals(object obj)
        {
            TextNavigationPoint b = obj as TextNavigationPoint;

            if (b == null)
            {
                return(false);
            }

            return(this.FileName.Equals(b.FileName) &&
                   (Math.Abs(this.LineNumber - b.LineNumber) <= THREASHOLD));
        }
예제 #2
0
        public override int CompareTo(object obj)
        {
            int cmp;

            if ((cmp = base.CompareTo(obj)) != 0)
            {
                return(cmp);
            }

            TextNavigationPoint b = obj as TextNavigationPoint;

            if (this.LineNumber == b.LineNumber)
            {
                return(0);
            }

            if (this.LineNumber > b.LineNumber)
            {
                return(1);
            }

            return(-1);
        }