public void MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint)
        {
            TextRangeProvider other = (TextRangeProvider)targetRange;

            Log("{0}.MoveEndpointByRange({1}, {2}, {3})", ID, endpoint, other.ID, targetEndpoint);
            SetEndpoint(endpoint, other.GetEndpoint(targetEndpoint));
        }
        public ITextRangeProvider Clone()
        {
            var result = new TextRangeProvider(textArea, doc, segment);

            Log("{0}.Clone() = {1}", ID, result.ID);
            return(result);
        }
        public int CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint)
        {
            TextRangeProvider other = (TextRangeProvider)targetRange;
            int result = GetEndpoint(endpoint).CompareTo(other.GetEndpoint(targetEndpoint));

            Log("{0}.CompareEndpoints({1}, {2}, {3}) = {4}", ID, endpoint, other.ID, targetEndpoint, result);
            return(result);
        }
        public bool Compare(ITextRangeProvider range)
        {
            TextRangeProvider other = (TextRangeProvider)range;
            bool result             = doc == other.doc &&
                                      segment.Offset == other.segment.Offset &&
                                      segment.EndOffset == other.segment.EndOffset;

            Log("{0}.Compare({1}) = {2}", ID, other.ID, result);
            return(result);
        }
 public ITextRangeProvider Clone()
 {
     var result = new TextRangeProvider(textArea, doc, segment);
     Log("{0}.Clone() = {1}", ID, result.ID);
     return result;
 }