MS\Internal\Annotations\TextAnchor.cs (34)
51foreach (TextSegment segment in anchor.TextSegments)
143TextSegment newSegment = CreateNormalizedSegment(start, end);
188internal bool IsOverlapping(ICollection<TextSegment> textSegments)
194TextSegment ourSegment, theirSegment;
196IEnumerator<TextSegment> ourEnumerator = _segments.GetEnumerator();
197IEnumerator<TextSegment> theirEnumerator = textSegments.GetEnumerator();
259foreach (TextSegment segment in otherAnchor.TextSegments)
278internal static TextAnchor TrimToRelativeComplement(TextAnchor anchor, ICollection<TextSegment> textSegments)
285IEnumerator<TextSegment> enumerator = textSegments.GetEnumerator();
288TextSegment current;
289TextSegment otherSegment = TextSegment.Null;
292Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
380internal static TextAnchor TrimToIntersectionWith(TextAnchor anchor, ICollection<TextSegment> textSegments)
386TextSegment currentSegment, otherSegment = TextSegment.Null;
389IEnumerator<TextSegment> enumerator = textSegments.GetEnumerator();
394Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
558internal ReadOnlyCollection<TextSegment> TextSegments
590private static ICollection<TextSegment> SortTextSegments(ICollection<TextSegment> textSegments, bool excludeZeroLength)
594List<TextSegment> orderedList = new List<TextSegment>(textSegments.Count);
602TextSegment segment = orderedList[i];
625private void InsertSegment(TextSegment newSegment)
651private static TextSegment CreateNormalizedSegment(ITextPointer start, ITextPointer end)
747private List<TextSegment> _segments = new List<TextSegment>(1);
764private class TextSegmentComparer : IComparer<TextSegment>
772public int Compare(TextSegment x, TextSegment y)
774if (x.Equals(TextSegment.Null))
777if (y.Equals(TextSegment.Null))
786if (y.Equals(TextSegment.Null))