private bool IsMemberSelected(CodeElement2 member)
        {
            TextPoint memberStart = member.StartPoint;
            TextPoint memberEnd   = member.EndPoint;

            bool result = (memberStart.GreaterThan(this.selectionStart) || memberStart.EqualTo(this.selectionStart)) &&
                          (memberEnd.LessThan(this.selectionEnd) || memberEnd.EqualTo(this.selectionEnd));

            return(result);
        }
예제 #2
0
        public int CompareByStartPoint(CodeMember other)
        {
            int result = 0;

            TextPoint thisStart  = this.element.StartPoint;
            TextPoint otherStart = other.element.StartPoint;

            if (thisStart.LessThan(otherStart))
            {
                result = -1;
            }
            else if (otherStart.LessThan(thisStart))
            {
                result = 1;
            }

            return(result);
        }