5 implementations of CompareTo
PresentationFramework (5)
System\Windows\Controls\PasswordTextNavigator.cs (1)
82int ITextPointer.CompareTo(ITextPointer position)
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
64int ITextPointer.CompareTo(ITextPointer position)
System\Windows\Documents\FixedTextPointer.cs (1)
82int ITextPointer.CompareTo(ITextPointer position)
System\Windows\Documents\NullTextNavigator.cs (1)
48int ITextPointer.CompareTo(ITextPointer position)
System\Windows\Documents\TextPointer.cs (1)
2353int ITextPointer.CompareTo(ITextPointer position)
405 references to CompareTo
PresentationFramework (405)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (2)
559if (start.CompareTo(end) > 0) 582if (start.CompareTo(end) > 0)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
127if (start.CompareTo(end) == 0) 135while (((ITextPointer)current).CompareTo(end) < 0) 304if (pointer.CompareTo(pointer.TextContainer.End) == 0)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (7)
155if (elementStart.CompareTo(end) > 0) 158if (elementEnd.CompareTo(start) < 0) 244if (start.CompareTo(end) >= 0) 287if (anchor.Start.CompareTo(currentStart) != 0) 291if (anchor.End.CompareTo(currentEnd) != 0) 530if (elementStart.CompareTo(segment.Start) >= 0) 540if (elementEnd.CompareTo(segment.End) >= 0)
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (27)
82Debug.Assert(start.CompareTo(end) <= 0, "end pointer before start"); 84if (start.CompareTo(end) == 0) 121if (highlightRange.Range.Start.CompareTo(highlightRange.Range.End) == 0) 165if (highlightRange.Range.Start.CompareTo(highlightRange.Range.End) == 0) 200if (highlightRange.Range.Start.CompareTo(highlightRange.Range.End) == 0) 363if (highlightSegment.Segment.Start.CompareTo(rangeSegment.Start) <= 0) 365if (highlightSegment.Segment.End.CompareTo(rangeSegment.Start) > 0) 381if (rangeSegment.End.CompareTo(highlightSegment.Segment.End) <= 0) 386(rangeSegment.End.CompareTo(rangeEnumerator.Current.Start) <= 0), 412if (rangeSegment.End.CompareTo(highlightSegment.Segment.Start) > 0) 510if (highlightSegment.Segment.Start.CompareTo(start) == 0) 512if (highlightSegment.Segment.End.CompareTo(end) == 0) 770if ((ps.CompareTo(_segment.Start) == 0) || (ps.CompareTo(_segment.End) == 0)) 772if (((ps.CompareTo(_segment.Start) == 0) && (side == LogicalDirection.Forward)) || 773((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward))) 799Debug.Assert((ps1 != null) && (ps2 != null) && (ps1.CompareTo(ps2) <= 0), "invalid splitting points"); 803if (ps1.CompareTo(ps2) == 0) 806if ((_segment.Start.CompareTo(ps1) > 0) || (_segment.End.CompareTo(ps1) < 0)) 809if (_segment.Start.CompareTo(ps1) < 0) 817if (_segment.End.CompareTo(ps1) > 0) 863else if ((res[0].Segment.Start.CompareTo(ps1) == 0) || 864(res[0].Segment.End.CompareTo(ps2) == 0)) 996while (cursor.CompareTo(_segment.End) < 0) 1074if (cursor.CompareTo(end) > 0) 1083if (segmentStart.CompareTo(segmentEnd) < 0)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (2)
1115int res = firstAnchor.Start.CompareTo(secondAnchor.Start); 1117res = firstAnchor.End.CompareTo(secondAnchor.End);
MS\Internal\Annotations\TextAnchor.cs (29)
115if (textPointer.CompareTo(this.Start) < 0) 119else if (textPointer.CompareTo(this.End) > 0) 178if ((_segments[i].Start.CompareTo(other._segments[i].Start) != 0) || 179(_segments[i].End.CompareTo(other._segments[i].End) != 0)) 210if (theirSegment.Start.CompareTo(theirSegment.End) == 0) 218if ((ourSegment.Start.CompareTo(theirSegment.Start) == 0) && 224if ((ourSegment.End.CompareTo(theirSegment.End) == 0) && 230if (ourSegment.Start.CompareTo(theirSegment.End) >= 0) 237if (ourSegment.End.CompareTo(theirSegment.Start) <= 0) 295Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered."); 302if (current.Start.CompareTo(otherSegment.End) >= 0) 309if (current.Start.CompareTo(otherSegment.Start) >= 0) 312if (current.End.CompareTo(otherSegment.End) <= 0) 332if (current.End.CompareTo(otherSegment.Start) > 0) 337if (current.End.CompareTo(otherSegment.End) > 0) 397Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered."); 403if (currentSegment.Start.CompareTo(otherSegment.End) >= 0) 410if (currentSegment.End.CompareTo(otherSegment.Start) <= 0) 421if (currentSegment.Start.CompareTo(otherSegment.Start) < 0) 430if (currentSegment.End.CompareTo(otherSegment.End) > 0) 438else if (currentSegment.End.CompareTo(otherSegment.End) == 0) 606if (segment.Start.CompareTo(segment.End) >= 0) 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) 657if (start.CompareTo(end) == 0) 678if (start.CompareTo(end) >= 0) 793int retVal = x.Start.CompareTo(y.Start); 799return x.End.CompareTo(y.End);
MS\Internal\Documents\DocumentViewerHelper.cs (6)
154if (textSegment.Start.CompareTo(startPointer) < 0) 163if (textSegment.End.CompareTo(startPointer) > 0) 197(findResult.Start.CompareTo(textSelection.Start) == 0) && 198(findResult.End.CompareTo(textSelection.End) == 0)) 218if (contentStart != null && contentEnd != null && contentStart.CompareTo(contentEnd) != 0) 222if (contentStart.CompareTo(contentEnd) > 0)
MS\Internal\Documents\HostedElements.cs (4)
97Debug.Assert(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0 && 98((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].End) < 0); 108Debug.Assert(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0); 109while (((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].End) < 0)
MS\Internal\Documents\MultiPageTextView.cs (3)
163ITextPointer startPositionInTextSegment = startPosition.CompareTo(textSegment.Start) > 0 ? startPosition : textSegment.Start; 164ITextPointer endPositionInTextSegment = endPosition.CompareTo(textSegment.End) < 0 ? endPosition : textSegment.End; 166if (startPositionInTextSegment.CompareTo(endPositionInTextSegment) >= 0)
MS\Internal\Documents\ParagraphResult.cs (3)
432contains = (position.CompareTo(this.EndPosition) == 0); 1090ITextPointer endPositionInThisPara = endPosition.CompareTo(this.EndPosition) < 0 ? endPosition : this.EndPosition; 1262ITextPointer endPositionInThisPara = endPosition.CompareTo(this.EndPosition) < 0 ? endPosition : this.EndPosition;
MS\Internal\Documents\TextContainerHelper.cs (3)
319while (start.CompareTo(end) < 0) 397Invariant.Assert(elementStart.CompareTo(ownerContentStart) >= 0); 404if (position.CompareTo(ownerContentStart) <= 0)
MS\Internal\Documents\TextDocumentView.cs (34)
155ITextPointer startPositionInThisSegment = startPosition.CompareTo(textSegment.Start) > 0 ? startPosition : textSegment.Start; 156ITextPointer endPositionInThisSegment = endPosition.CompareTo(textSegment.End) < 0 ? endPosition : textSegment.End; 159if (startPositionInThisSegment.CompareTo(endPositionInThisSegment) >= 0) 475if (segment.Start.CompareTo(position) < 0 && segment.End.CompareTo(position) > 0) 480if (segment.Start.CompareTo(position) == 0) 499if (segment.End.CompareTo(position) == 0) 524if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 526contains = (position.TextContainer.Start.CompareTo(segments[0].Start) == 0); 528else if (position.TextContainer.End.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Forward) 530contains = (position.TextContainer.End.CompareTo(segments[segments.Count - 1].End) == 0); 1284if (endPosition.CompareTo(paragraphs[i].StartPosition) <= 0) 1291if (startPosition.CompareTo(paragraphs[i].EndPosition) > 0) 1380if (!(startPosition.CompareTo(floatingElements[i].StartPosition) > 0 && 1381endPosition.CompareTo(floatingElements[i].EndPosition) < 0)) 2153if (position.CompareTo(columns[0].StartPosition) == 0) 2157else if (position.CompareTo(columns[columns.Count - 1].EndPosition) == 0) 2229if (position.CompareTo(paragraphs[paragraphIndex].StartPosition) < 0) 2249if (position.CompareTo(paragraphs[0].StartPosition) == 0) 2253else if (position.CompareTo(paragraphs[paragraphs.Count - 1].EndPosition) == 0) 3141if (start.CompareTo(tpr.EndPosition) < 0 && end.CompareTo(tpr.StartPosition) > 0) 3143ITextPointer startRange = start.CompareTo(tpr.StartPosition) < 0 ? tpr.StartPosition : start; 3144ITextPointer endRange = end.CompareTo(tpr.EndPosition) < 0 ? end : tpr.EndPosition; 3148if (end.CompareTo(tpr.EndPosition) < 0) 3194ITextPointer endThisPara = end.CompareTo(paragraph.EndPosition) < 0 ? end : paragraph.EndPosition; 3245if (start.CompareTo(columnResult.StartPosition) >= 0 && start.CompareTo(columnResult.EndPosition) <= 0) 3251if (end.CompareTo(columnResult.StartPosition) >= 0 && end.CompareTo(columnResult.EndPosition) <= 0) 3483if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.CompareTo(textElement.ElementStart) == 0) 3488if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0) 3517if (textPointer.CompareTo(textElement.ContentStart) == 0) 3522if (textPointer.CompareTo(textElement.ContentEnd) == 0)
MS\Internal\PtsHost\BreakRecordTable.cs (2)
452if (start.CompareTo(dependentMax) <= 0) 462if (start.CompareTo(textSegment.End) <= 0)
MS\Internal\PtsHost\ContainerParagraph.cs (2)
1038if(textPointer.TextContainer.Start.CompareTo(textPointer) > 0) 1102Invariant.Assert(textPointer.CompareTo(textPointer.TextContainer.End) == 0);
MS\Internal\PtsHost\FlowDocumentPage.cs (3)
960while (elementPosition == null && ((ITextPointer)searchPosition).CompareTo(_structuralCache.TextContainer.End) < 0) 995if (((ITextPointer)elementPosition).CompareTo(((ITextView)_textView).TextSegments[segmentIndex].Start) >= 0 && 996((ITextPointer)elementPosition).CompareTo(((ITextView)_textView).TextSegments[segmentIndex].End) < 0)
MS\Internal\PtsHost\Line.cs (1)
209position.CompareTo(startPosition) != 0)
MS\Internal\PtsHost\OptimalTextSource.cs (1)
158position.CompareTo(startPosition) != 0)
MS\Internal\PtsHost\TableParaClient.cs (4)
861if (endPosition.CompareTo(cpc.Cell.ContentStart) <= 0) 871if (startPosition.CompareTo(cpc.Cell.ContentEnd) <= 0) 928if(position.CompareTo(cpc.Cell.ContentStart) >= 0 && position.CompareTo(cpc.Cell.ContentEnd) <= 0)
MS\Internal\PtsHost\UIElementParaClient.cs (2)
146if (startPosition.CompareTo(((BlockUIContainer)Paragraph.Element).ContentEnd) < 0 && 147endPosition.CompareTo(((BlockUIContainer)Paragraph.Element).ContentStart) > 0)
MS\Internal\Text\ComplexLine.cs (1)
98position.CompareTo(_owner.TextContainer.Start) != 0)
System\Windows\Annotations\AnnotationHelper.cs (8)
845if (((selection.Start.CompareTo(anchor.Start) > 0) && (selection.Start.CompareTo(anchor.End) < 0)) || 846((selection.End.CompareTo(anchor.Start) > 0) && (selection.End.CompareTo(anchor.End) < 0)) || 847((selection.Start.CompareTo(anchor.Start) <= 0) && (selection.End.CompareTo(anchor.End) >= 0)) || 869if (((anchor.Start.CompareTo(selection.Start) == 0) && 871((anchor.End.CompareTo(selection.End) == 0) &&
System\Windows\Controls\PasswordTextContainer.cs (2)
273return ((ITextPointer)position1.Handle0).CompareTo((ITextPointer)position2.Handle0); 278return ((ITextPointer)position1.Handle0).CompareTo(position2);
System\Windows\Controls\PasswordTextNavigator.cs (1)
107return ((ITextPointer)this).CompareTo((ITextPointer)position.Handle0);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (2)
807if (textSegment.Start.CompareTo(masterPointer) < 0) 816if (textSegment.End.CompareTo(masterPointer) > 0)
System\Windows\Controls\TextAdaptor.cs (7)
104if (!textView.Contains(start) && start.CompareTo(textSegments[0].Start) < 0) 108if (!textView.Contains(end) && end.CompareTo(textSegments[textSegments.Count-1].End) > 0) 134while (position.CompareTo(end) < 0) 141ITextPointer first = (lineRange.Start.CompareTo(start) <= 0) ? start : lineRange.Start; 142ITextPointer last = (lineRange.End.CompareTo(end) >= 0) ? end : lineRange.End; 304if (rangeStart.CompareTo(rangeEnd) > 0) 616while (position.CompareTo(_textContainer.End) < 0)
System\Windows\Controls\TextBlock.cs (1)
2282Invariant.Assert(startPosition.CompareTo(endPosition) <= 0);
System\Windows\Controls\TextRangeAdaptor.cs (43)
464Invariant.Assert(start.CompareTo(end) <= 0, "Invalid range, end < start."); 608if (_start.CompareTo(lineRange.Start) != 0) 617if (_end.CompareTo(lineRange.End) != 0) 630if (_end.CompareTo(lineRange.End) != 0) 643if (expandStart && _start.CompareTo(textRange.Start) != 0) 653if (_end.CompareTo(textRange.End) != 0) 681if (_start.CompareTo(textSegments[0].Start) != 0) 698if (_end.CompareTo(textSegments[textSegments.Count - 1].End) != 0) 708if (expandStart && _start.CompareTo(_start.TextContainer.Start) != 0) 712if (expandEnd && _end.CompareTo(_start.TextContainer.End) != 0) 813if (position.CompareTo(nextLineStart) != 0) 840if (position.CompareTo(previousLineEnd) != 0) 870if (position.CompareTo(nextParagraphStart) != 0) 891if (position.CompareTo(previousParagraphEnd) != 0) 925while (position.CompareTo(textSegments[textSegments.Count - 1].End) != 0) 939while (position.CompareTo(textSegments[0].Start) != 0) 958if (position.CompareTo(GetInsertionPosition(position.TextContainer.End, LogicalDirection.Backward)) != 0) 966if (position.CompareTo(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0) 1167if (positionTemp.CompareTo(position) <= 0) 1174if (positionTemp.CompareTo(position) >= 0) 1209if (start.CompareTo(end) < 0) 1215if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) >= 0) 1222if (!end.MoveToNextContextPosition(LogicalDirection.Backward) || start.CompareTo(end) >= 0) 1227if (start.CompareTo(end) > 0) 1235while (start.CompareTo(end) < 0 && attr.AreEqual(valueAtEndPos, attr.GetValueAt(start))) 1237if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) > 0) 1243return (start.CompareTo(end) >= 0) ? valueAtEndPos : TextPatternIdentifiers.MixedAttributeValue; 1497if (_start.CompareTo(_end) > 0) 1599return (rangeAdaptor._start.CompareTo(_start) == 0 && rangeAdaptor._end.CompareTo(_end) == 0); 1623return position.CompareTo(targetPosition); 1680while (position.CompareTo(stop) > 0) 1711while (position.CompareTo(stop) < 0) 1759if (_start.CompareTo(_end) == 0) 1900if ((position.CompareTo(_start)==0 && position.LogicalDirection != _start.LogicalDirection) || 1901(count > 0 && position.CompareTo(_start) > 0) || 1902(count < 0 && position.CompareTo(_start) < 0)) 1960if ((count > 0 && position.CompareTo(positionRef) > 0) || 1961(count < 0 && position.CompareTo(positionRef) < 0) || 1962(position.CompareTo(positionRef) == 0 && position.LogicalDirection != positionRef.LogicalDirection)) 1984if (_start.CompareTo(_end) > 0) 2014if (_start.CompareTo(_end) > 0) 2023if (_start.CompareTo(_end) > 0)
System\Windows\Documents\CompositionAdorner.cs (7)
488while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 577while (endLinePointer.CompareTo(end) < 0) 589Debug.Assert(start.CompareTo(startLinePointer) <= 0, "The start pointer is positioned after the composition start line pointer!"); 591if (startLinePointer.CompareTo(textSegment.Start) < 0) 597if (endLinePointer.CompareTo(textSegment.End) < 0) 599if (end.CompareTo(textSegment.End) < 0) 612Debug.Assert(endLinePointer.CompareTo(textSegment.End) == 0, "The end line pointer is positioned after the composition text range end pointer!");
System\Windows\Documents\DocumentSequenceTextContainer.cs (5)
169return ((ITextPointer)position1.Handle0).CompareTo((ITextPointer)position2.Handle0); 174return ((ITextPointer)position1.Handle0).CompareTo(position2); 713Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0); 763if (tpChildStart.CompareTo(tpChildEnd) != 0) 783if (tpChildStart.CompareTo(tpChildEnd) != 0)
System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
62/// <see cref="ITextPointer.CompareTo(ITextPointer)"/> 74return ((ITextPointer)this).CompareTo((ITextPointer)position.Handle0); 603/// <see cref="ITextPointer.CompareTo(ITextPointer)"/> 955return thisTp.ChildPointer.CompareTo(tp.ChildPointer);
System\Windows\Documents\FixedDocument.cs (1)
1044Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0);
System\Windows\Documents\FixedElement.cs (1)
269while (pos.CompareTo((ITextPointer)_end) < 0)
System\Windows\Documents\FixedTextContainer.cs (4)
154return ((ITextPointer)position1.Handle0).CompareTo((ITextPointer)position2.Handle0); 159return ((ITextPointer)position1.Handle0).CompareTo(position2); 619Debug.Assert(start.CompareTo(end) <= 0); 624if (start.CompareTo(end) == 0)
System\Windows\Documents\FixedTextPointer.cs (1)
74return ((ITextPointer)this).CompareTo((ITextPointer)position.Handle0);
System\Windows\Documents\FixedTextView.cs (2)
415if (pos.CompareTo(position) == 0) 621if (begin.CompareTo(end) > 0)
System\Windows\Documents\NullTextContainer.cs (2)
142return ((ITextPointer)position1.Handle0).CompareTo((ITextPointer)position2.Handle0); 147return ((ITextPointer)position1.Handle0).CompareTo(position2);
System\Windows\Documents\Paragraph.cs (1)
251while (navigator.CompareTo(end) < 0)
System\Windows\Documents\Speller.cs (32)
660Invariant.Assert(start.CompareTo(end) < 0); 671Invariant.Assert(start.CompareTo(end) < 0); 734if (wordBreakLeft.CompareTo(rawEnd) < 0 && 735wordBreakRight.CompareTo(rawStart) > 0) 737if (wordBreakLeft.CompareTo(rawStart) > 0) 742else if (wordBreakRight.CompareTo(rawEnd) < 0) 800Invariant.Assert(contentStart.CompareTo(contentEnd) < 0); 801Invariant.Assert(contextStart.CompareTo(contextEnd) < 0); 802Invariant.Assert(contentStart.CompareTo(contextStart) >= 0); 803Invariant.Assert(contentEnd.CompareTo(contextEnd) <= 0); 831if (status.TimeoutPosition.CompareTo(end) < 0) 838if (status.TimeoutPosition.CompareTo(start) <= 0) 871Invariant.Assert(status.TimeoutPosition.CompareTo(contentEnd) <= 0); 1027if (timeoutPosition.CompareTo(status.StartPosition) > 0) 1212if (position.CompareTo(contentPosition) < 0) 1216if (position.CompareTo(contextPosition) < 0) 1223if (position.CompareTo(contentPosition) > 0) 1227if (position.CompareTo(contextPosition) > 0) 1350if (direction == LogicalDirection.Backward && closestErrorPosition.CompareTo(searchPosition) > 0 || 1351direction == LogicalDirection.Forward && closestErrorPosition.CompareTo(searchPosition) < 0) 1361if (direction == LogicalDirection.Backward && closestLanguageTransition.CompareTo(searchPosition) > 0 || 1362direction == LogicalDirection.Forward && closestLanguageTransition.CompareTo(searchPosition) < 0) 1395while ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) < 0) || 1396(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) > 0)) 1405if ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) > 0) || 1406(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) < 0)) 1659Invariant.Assert(contextStart.CompareTo(contentStart) <= 0); 1660Invariant.Assert(contextEnd.CompareTo(contentEnd) >= 0); 1678while (position.CompareTo(contextEnd) < 0) 1680if (position.CompareTo(contentStart) == 0) 1684if (position.CompareTo(contentEnd) == 0) 1745if (position.CompareTo(contentEnd) == 0)
System\Windows\Documents\SpellerError.cs (1)
32Invariant.Assert(start.CompareTo(end) < 0);
System\Windows\Documents\SpellerHighlightLayer.cs (1)
204Invariant.Assert(start.CompareTo(end) < 0, "Bogus start/end combination!");
System\Windows\Documents\SpellerStatusTable.cs (8)
135Invariant.Assert(run.Position.CompareTo(start) <= 0); 138if (run.Position.CompareTo(start) == 0) 383if (start.CompareTo(end) == 0) 446Invariant.Assert(start.CompareTo(end) < 0); 461if (run.Position.CompareTo(start) >= 0) 627if (runPosition.CompareTo(position) > 0 && runPosition.CompareTo(GetRunEndPosition(i)) != 0) 664if (errorStart.CompareTo(errorEnd) != 0) // errorStart == errorEnd if content was deleted. 691Invariant.Assert(run.Position.CompareTo(run.Position.TextContainer.Start) == 0);
System\windows\Documents\TextEditorDragDrop.cs (2)
479dropPosition.CompareTo(lineRange.End) < 0 && 632if (dropPosition.CompareTo(textSegment.End) == 0)
System\windows\Documents\TextEditorSelection.cs (15)
529if (This.Selection.Start.CompareTo(paragraphRange.Start) > 0) 642if (targetPosition.CompareTo(movingPosition) <= 0) 756if (targetPosition.CompareTo(movingPosition) >= 0) 1123int newComparedToOld = newMovingPosition.CompareTo(originalMovingPosition); 1242int newComparedToOld = newMovingPosition.CompareTo(originalMovingPosition); 1376if (movingPointer.CompareTo(paragraphRange.Start) > 0) 1470if (targetPosition.CompareTo(movingPosition) <= 0) 1566if (targetPosition.CompareTo(movingPosition) >= 0) 1661if (lineRange.End.CompareTo(This.Selection.End) < 0) 1678if (!lineRange.IsNull && anchorLineRange.Start.CompareTo(This.Selection.AnchorPosition) == 0) 1860int newComparedToOld = e.NewPosition.CompareTo(e.Position); 1923int newComparedToOld = e.NewPosition.CompareTo(e.Position); 2255if (This.Selection.MovingPosition.CompareTo(innerMovingPosition) > 0) 2322This.Selection.Start.CompareTo(movingPosition) < 0 && 2361if (end.CompareTo(This.Selection.MovingPosition) == 0)
System\windows\Documents\TextEditorSpelling.cs (6)
186while (textStart.CompareTo(spellingError.End) < 0 && 192while (textEnd.CompareTo(spellingError.Start) > 0 && 199textStart.CompareTo(spellingError.End) == 0) 204textEnd.CompareTo(spellingError.Start) != 0); 262(limit == null || position.CompareTo(limit) < 0)) 311if (position.CompareTo(limit) == 0)
System\windows\Documents\TextEditorTyping.cs (2)
672if (backspacePosition.CompareTo(position) == 0) 717Invariant.Assert(backspacePosition.CompareTo(position) < 0);
System\Windows\Documents\TextFindEngine.cs (9)
98|| findContainerStartPosition.CompareTo(findContainerEndPosition) == 0 190Invariant.Assert(startPosition.CompareTo(endPosition) <= 0); 220while ((matchLast ? startPosition.CompareTo(navigator) : navigator.CompareTo(endPosition)) < 0) 333if (position.CompareTo(nextPosition) > 0) 651Invariant.Assert(startPosition.CompareTo(navigator) <= 0); 652Invariant.Assert(endPosition.CompareTo(navigator) >= 0); 665while ((matchLast ? startPosition.CompareTo(navigator) : navigator.CompareTo(endPosition)) < 0)
System\Windows\Documents\TextPointerBase.cs (17)
40return position1.CompareTo(position2) <= 0 ? position1 : position2; 54return position1.CompareTo(position2) >= 0 ? position1 : position2; 85else if (direction == LogicalDirection.Forward && limit.CompareTo(thisPointer) <= 0) 90else if (direction == LogicalDirection.Backward && limit.CompareTo(thisPointer) >= 0) 571if (wordStart.CompareTo(wordEnd) < 0) 582Invariant.Assert(wordStart.CompareTo(wordEnd) <= 0, "expecting wordStart <= wordEnd"); 588Invariant.Assert(!(direction == LogicalDirection.Backward) || position.CompareTo(limit) >= 0, "for backward direction position must be >= than limit"); 589Invariant.Assert(!(direction == LogicalDirection.Forward) || position.CompareTo(limit) <= 0, "for forward direcion position must be <= than linit"); 591while (direction == LogicalDirection.Backward ? position.CompareTo(limit) > 0 : position.CompareTo(limit) < 0) 700? position.CompareTo(lineSegment.Start) == 0 701: position.CompareTo(lineSegment.End) == 0; 982if ((direction == LogicalDirection.Forward && initialPosition.CompareTo(thisNavigator) < 0) || 983(direction == LogicalDirection.Backward && thisNavigator.CompareTo(initialPosition) < 0)) 1039Invariant.Assert(thisNavigator.CompareTo(initialPosition) > 0, "thisNavigator is expected to be moved from initialPosition - 1"); 1043Invariant.Assert(thisNavigator.CompareTo(initialPosition) < 0, "thisNavigator is expected to be moved from initialPosition - 2"); 1048Invariant.Assert(thisNavigator.CompareTo(initialPosition) == 0, "thisNavigator must stay at initial position");
System\Windows\Documents\TextRangeBase.cs (15)
75if (textPointer.CompareTo(thisRange.Start) < 0) 79else if (textPointer.CompareTo(thisRange.End) > 0) 404while (moved && position.CompareTo(textSegment.End) < 0) 479while (moved && position.CompareTo(textSegment.End) <= 0) 675Invariant.Assert(startPosition.CompareTo(endPosition) <= 0, "expecting: startPosition <= endPosition"); 677while (navigator.CompareTo(endPosition) < 0) 1216(thisRange.Start.CompareTo(thisRange.End) == 0), 1707if (start.CompareTo(end) == 0) 1729if (start.CompareTo(end) >= 0) 1754Invariant.Assert(start.CompareTo(end) <= 0, "expecting start <= end"); 1757if (start.CompareTo(end) == 0) 1950else if (start.CompareTo(end) == 0) 2027if (position1.CompareTo(position2) > 0) 2044if (finalStart.CompareTo(newStart) != 0 || finalEnd.CompareTo(newEnd) != 0)
System\Windows\Documents\TextRangeEdit.cs (2)
1250if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1415Invariant.Assert(start.CompareTo(end) <= 0, "expecting: start <= end");
System\Windows\Documents\TextRangeEditTables.cs (1)
411if (segment.Start.CompareTo(segment.End) != 0)
System\Windows\Documents\TextRangeSerialization.cs (5)
166if (((ITextPointer)fragment.ContentStart).CompareTo(fragment.ContentEnd) == 0) 217while (textReader.CompareTo(rangeEnd) < 0) 1863if (elementEnd.CompareTo(rangeEnd) > 0) 1897if (hyperlinkEnd.CompareTo(rangeEnd) > 0) 1904while (hyperlinkNavigation.CompareTo(hyperlinkEnd) < 0)
System\windows\Documents\TextSegment.cs (4)
65if (startPosition.CompareTo(endPosition) == 0) 75Invariant.Assert(startPosition.CompareTo(endPosition) < 0); 97return (!this.IsNull && this._start.CompareTo(position) <= 0 && position.CompareTo(this._end) <= 0);
System\windows\Documents\TextSelection.cs (16)
623if (movingPosition.CompareTo(movingPosition.TextContainer.End) != 0) 639LogicalDirection contentDirection = (anchorPosition.CompareTo(newMovingPosition) <= 0) ? 816if (forceParagraphSelection || _previousCursorPosition != null && cursorPosition.CompareTo(_previousCursorPosition) == 0) 841if (anchorWordRange.Start.CompareTo(cursorWordRange.Start) <= 0) 932(anchorPosition.CompareTo(cursorPosition) < 0 && cursorPosition.CompareTo(_previousCursorPosition) < 0 || 933_previousCursorPosition.CompareTo(cursorPosition) < 0 && cursorPosition.CompareTo(anchorPosition) < 0)) 1875if (_anchorPosition.CompareTo(thisSelection.Start) < 0) 1879else if (_anchorPosition.CompareTo(thisSelection.End) > 0) 1903movingEdge = (anchorPosition.CompareTo(movingPosition) <= 0) ? MovingEdge.End : MovingEdge.Start; 1908if (movingPosition.CompareTo(thisSelection.Start) == 0) 1912else if (movingPosition.CompareTo(thisSelection.End) == 0) 1916else if (movingPosition.CompareTo(thisSelection.TextSegments[0].End) == 0) 1920else if (movingPosition.CompareTo(thisSelection.TextSegments[thisSelection.TextSegments.Count-1].Start) == 0) 1926movingEdge = (anchorPosition.CompareTo(movingPosition) <= 0) ? MovingEdge.End : MovingEdge.Start;
System\windows\Documents\TextSelectionHighlightLayer.cs (9)
137if (textSegment.Start.CompareTo(textSegment.End) != 0) 158if (textSegment.Start.CompareTo(textSegment.End) != 0) 215if (_oldStart.CompareTo(newStart) < 0) 227if (_oldEnd.CompareTo(newEnd) < 0) 243if (invalidRangeLeftStart.CompareTo(invalidRangeLeftEnd) != 0 || invalidRangeRightStart.CompareTo(invalidRangeRightEnd) != 0) 311return textRange._TextSegments[0].Start.CompareTo(textRange._TextSegments[textRange._TextSegments.Count - 1].End) == 0; 335if (invalidRangeLeftStart.CompareTo(invalidRangeLeftEnd) == 0) 340else if (invalidRangeRightStart.CompareTo(invalidRangeRightEnd) == 0)
System\Windows\Documents\TextStore.cs (28)
344selection[0].style.ase = (this.TextSelection.MovingPosition.CompareTo(this.TextSelection.Start) == 0) ? UnsafeNativeMethods.TsActiveSelEnd.TS_AE_START : UnsafeNativeMethods.TsActiveSelEnd.TS_AE_END; 450hitLimit = (limit != null && navigator.CompareTo(limit) >= 0); 456hitLimit = (limit != null && navigator.CompareTo(limit) >= 0); 510if (start.CompareTo(end) > 0) 753if (start.CompareTo(this.TextSelection.Start) != 0 || 754end.CompareTo(this.TextSelection.End) != 0) 1094ITextPointer start = (lineRange.Start.CompareTo(startPointer) <= 0) ? startPointer : lineRange.Start; 1095end = (lineRange.End.CompareTo(endPointer) >= 0) ? endPointer : lineRange.End; 1112if (end.CompareTo(endPointer) == 0) 1264if (this.TextEditor.AcceptsRichContent && start.CompareTo(end) != 0) 1778if ((compositionStart.CompareTo(TextSelection.Start) <= 0) && 1779(compositionStart.CompareTo(TextSelection.End) <= 0) && 1780(compositionEnd.CompareTo(TextSelection.Start) >= 0) && 1781(compositionEnd.CompareTo(TextSelection.End) >= 0)) 2464Invariant.Assert(limit == null || navigator.CompareTo(limit) <= 0); 2473hitLimit = (text.Length == charsCopied) || (limit != null && navigator.CompareTo(limit) == 0); 2486if (navigator.CompareTo(limit) >= 0) 2523Invariant.Assert(limit == null || navigator.CompareTo(limit) <= 0); 2525if (limit != null && navigator.CompareTo(limit) == 0) 2565Invariant.Assert(limit == null || navigator.CompareTo(limit) <= 0); 2571if (navigator.CompareTo(limit) >= 0) 2586hitLimit = (text.Length == charsCopied) || (limit != null && navigator.CompareTo(limit) == 0); 2916while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 3152if (compositionStart != null && compositionStart.CompareTo(this.TextSelection.Start) > 0) 3189while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.CompareTo(end) < 0) 3396if (startIn.CompareTo(endIn) != 0) 3469while (start.CompareTo(end) < 0) 3496if (start.CompareTo(end) == 0)
System\Windows\Documents\ValidationHelper.cs (1)
64if (startPosition.CompareTo(endPosition) > 0)