MS\Internal\Annotations\TextAnchor.cs (34)
54foreach (TextSegment segment in anchor.TextSegments)
146TextSegment newSegment = CreateNormalizedSegment(start, end);
191internal bool IsOverlapping(ICollection<TextSegment> textSegments)
197TextSegment ourSegment, theirSegment;
199IEnumerator<TextSegment> ourEnumerator = _segments.GetEnumerator();
200IEnumerator<TextSegment> theirEnumerator = textSegments.GetEnumerator();
262foreach (TextSegment segment in otherAnchor.TextSegments)
281internal static TextAnchor TrimToRelativeComplement(TextAnchor anchor, ICollection<TextSegment> textSegments)
288IEnumerator<TextSegment> enumerator = textSegments.GetEnumerator();
291TextSegment current;
292TextSegment otherSegment = TextSegment.Null;
295Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
383internal static TextAnchor TrimToIntersectionWith(TextAnchor anchor, ICollection<TextSegment> textSegments)
389TextSegment currentSegment, otherSegment = TextSegment.Null;
392IEnumerator<TextSegment> enumerator = textSegments.GetEnumerator();
397Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
561internal ReadOnlyCollection<TextSegment> TextSegments
593private static ICollection<TextSegment> SortTextSegments(ICollection<TextSegment> textSegments, bool excludeZeroLength)
597List<TextSegment> orderedList = new List<TextSegment>(textSegments.Count);
605TextSegment segment = orderedList[i];
628private void InsertSegment(TextSegment newSegment)
654private static TextSegment CreateNormalizedSegment(ITextPointer start, ITextPointer end)
750private List<TextSegment> _segments = new List<TextSegment>(1);
767private class TextSegmentComparer : IComparer<TextSegment>
775public int Compare(TextSegment x, TextSegment y)
777if (x.Equals(TextSegment.Null))
780if (y.Equals(TextSegment.Null))
789if (y.Equals(TextSegment.Null))