MS\Internal\Annotations\TextAnchor.cs (46)
56_segments.Add(new TextSegment(segment.Start, segment.End));
125for (int i = 0; i < _segments.Count; i++)
127if (_segments[i].Contains(textPointer))
173if (other._segments.Count != this._segments.Count)
176for (int i = 0; i < _segments.Count; i++)
178if ((_segments[i].Start.CompareTo(other._segments[i].Start) != 0) ||
179(_segments[i].End.CompareTo(other._segments[i].End) != 0))
199IEnumerator<TextSegment> ourEnumerator = _segments.GetEnumerator();
293while (currentIndex < anchor._segments.Count && hasMore)
297current = anchor._segments[currentIndex];
314anchor._segments.RemoveAt(currentIndex);
321anchor._segments[currentIndex] = CreateNormalizedSegment(otherSegment.End, current.End);
334anchor._segments[currentIndex] = CreateNormalizedSegment(current.Start, otherSegment.Start);
340anchor._segments.Insert(currentIndex + 1, CreateNormalizedSegment(otherSegment.End, current.End));
351if (anchor._segments.Count > 0)
395while (current < anchor._segments.Count && hasMore)
399currentSegment = anchor._segments[current];
412anchor._segments.RemoveAt(current);
423anchor._segments[current] = CreateNormalizedSegment(otherSegment.Start, currentSegment.End);
432anchor._segments[current] = CreateNormalizedSegment(currentSegment.Start, otherSegment.End);
434anchor._segments.Insert(current + 1, CreateNormalizedSegment(otherSegment.End, currentSegment.End));
450if (!hasMore && current < anchor._segments.Count)
452anchor._segments.RemoveRange(current, anchor._segments.Count - current);
455if (anchor._segments.Count == 0)
511return _segments.Count > 0 ? _segments[0].Start : null;
522return _segments.Count > 0 ? _segments[_segments.Count - 1].End : null;
534return (_segments.Count == 1 && (object)_segments[0].Start == (object)_segments[0].End);
549for (int i = 0; i < _segments.Count; i++)
551textBuffer.Append(TextRangeBase.GetTextInternal(_segments[i].Start, _segments[i].End));
565return _segments.AsReadOnly();
631for (; i < _segments.Count; i++)
633if (newSegment.Start.CompareTo(_segments[i].Start) < 0)
638if (i > 0 && newSegment.Start.CompareTo(_segments[i - 1].End) < 0)
642if (i < _segments.Count && newSegment.End.CompareTo(_segments[i].Start) > 0)
645_segments.Insert(i, newSegment);