5 implementations of CompareTo
PresentationFramework (5)
src\Framework\System\Windows\Controls\PasswordTextNavigator.cs (1)
84
int ITextPointer.
CompareTo
(ITextPointer position)
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
68
int ITextPointer.
CompareTo
(ITextPointer position)
src\Framework\System\Windows\Documents\FixedTextPointer.cs (1)
88
int ITextPointer.
CompareTo
(ITextPointer position)
src\Framework\System\Windows\Documents\NullTextNavigator.cs (1)
50
int ITextPointer.
CompareTo
(ITextPointer position)
src\Framework\System\Windows\Documents\TextPointer.cs (1)
2373
int ITextPointer.
CompareTo
(ITextPointer position)
404 references to CompareTo
PresentationFramework (404)
src\Framework\MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (2)
573
if (start.
CompareTo
(end) > 0)
597
if (start.
CompareTo
(end) > 0)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
131
if (start.
CompareTo
(end) == 0)
139
while (((ITextPointer)current).
CompareTo
(end) < 0)
314
if (pointer.
CompareTo
(pointer.TextContainer.End) == 0)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (7)
165
if (elementStart.
CompareTo
(end) > 0)
168
if (elementEnd.
CompareTo
(start) < 0)
257
if (start.
CompareTo
(end) >= 0)
300
if (anchor.Start.
CompareTo
(currentStart) != 0)
304
if (anchor.End.
CompareTo
(currentEnd) != 0)
544
if (elementStart.
CompareTo
(segment.Start) >= 0)
554
if (elementEnd.
CompareTo
(segment.End) >= 0)
src\Framework\MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (27)
86
Debug.Assert(start.
CompareTo
(end) <= 0, "end pointer before start");
88
if (start.
CompareTo
(end) == 0)
126
if (highlightRange.Range.Start.
CompareTo
(highlightRange.Range.End) == 0)
170
if (highlightRange.Range.Start.
CompareTo
(highlightRange.Range.End) == 0)
206
if (highlightRange.Range.Start.
CompareTo
(highlightRange.Range.End) == 0)
371
if (highlightSegment.Segment.Start.
CompareTo
(rangeSegment.Start) <= 0)
373
if (highlightSegment.Segment.End.
CompareTo
(rangeSegment.Start) > 0)
389
if (rangeSegment.End.
CompareTo
(highlightSegment.Segment.End) <= 0)
394
(rangeSegment.End.
CompareTo
(rangeEnumerator.Current.Start) <= 0),
421
if (rangeSegment.End.
CompareTo
(highlightSegment.Segment.Start) > 0)
523
if (highlightSegment.Segment.Start.
CompareTo
(start) == 0)
525
if (highlightSegment.Segment.End.
CompareTo
(end) == 0)
785
if ((ps.
CompareTo
(_segment.Start) == 0) || (ps.
CompareTo
(_segment.End) == 0))
787
if ( ((ps.
CompareTo
(_segment.Start) == 0) && (side == LogicalDirection.Forward)) ||
788
((ps.
CompareTo
(_segment.End) == 0) && (side == LogicalDirection.Backward)) )
814
Debug.Assert((ps1 != null) && (ps2 != null) && (ps1.
CompareTo
(ps2) <= 0), "invalid splitting points");
818
if (ps1.
CompareTo
(ps2) == 0)
821
if ((_segment.Start.
CompareTo
(ps1) > 0) || (_segment.End.
CompareTo
(ps1) < 0))
824
if (_segment.Start.
CompareTo
(ps1) < 0)
832
if (_segment.End.
CompareTo
(ps1) > 0)
879
else if ((res[0].Segment.Start.
CompareTo
(ps1) == 0) ||
880
(res[0].Segment.End.
CompareTo
(ps2) == 0))
1013
while (cursor.
CompareTo
(_segment.End) < 0)
1093
if (cursor.
CompareTo
(end) > 0)
1102
if (segmentStart.
CompareTo
(segmentEnd) < 0)
src\Framework\MS\Internal\Annotations\Component\MArkedHighlightComponent.cs (2)
1138
int res = firstAnchor.Start.
CompareTo
(secondAnchor.Start);
1140
res = firstAnchor.End.
CompareTo
(secondAnchor.End);
src\Framework\MS\Internal\Annotations\TextAnchor.cs (29)
121
if (textPointer.
CompareTo
(this.Start) < 0)
125
else if (textPointer.
CompareTo
(this.End) > 0)
184
if ((_segments[i].Start.
CompareTo
(other._segments[i].Start) != 0) ||
185
(_segments[i].End.
CompareTo
(other._segments[i].End) != 0))
216
if (theirSegment.Start.
CompareTo
(theirSegment.End) == 0)
224
if ((ourSegment.Start.
CompareTo
(theirSegment.Start) == 0) &&
230
if ((ourSegment.End.
CompareTo
(theirSegment.End) == 0) &&
236
if (ourSegment.Start.
CompareTo
(theirSegment.End) >= 0)
243
if (ourSegment.End.
CompareTo
(theirSegment.Start) <= 0)
302
Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.
CompareTo
(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
309
if (current.Start.
CompareTo
(otherSegment.End) >= 0)
316
if (current.Start.
CompareTo
(otherSegment.Start) >= 0)
319
if (current.End.
CompareTo
(otherSegment.End) <= 0)
339
if (current.End.
CompareTo
(otherSegment.Start) > 0)
344
if (current.End.
CompareTo
(otherSegment.End) > 0)
404
Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.
CompareTo
(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
410
if (currentSegment.Start.
CompareTo
(otherSegment.End) >= 0)
417
if (currentSegment.End.
CompareTo
(otherSegment.Start) <= 0)
428
if (currentSegment.Start.
CompareTo
(otherSegment.Start) < 0)
437
if (currentSegment.End.
CompareTo
(otherSegment.End) > 0)
445
else if (currentSegment.End.
CompareTo
(otherSegment.End) == 0)
613
if (segment.Start.
CompareTo
(segment.End) >= 0)
640
if (newSegment.Start.
CompareTo
(_segments[i].Start) < 0)
645
if (i > 0 && newSegment.Start.
CompareTo
(_segments[i - 1].End) < 0)
649
if (i < _segments.Count && newSegment.End.
CompareTo
(_segments[i].Start) > 0)
664
if (start.
CompareTo
(end) == 0)
685
if (start.
CompareTo
(end) >= 0)
800
int retVal = x.Start.
CompareTo
(y.Start);
806
return x.End.
CompareTo
(y.End);
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (6)
169
if (textSegment.Start.
CompareTo
(startPointer) < 0)
178
if (textSegment.End.
CompareTo
(startPointer) > 0)
212
(findResult.Start.
CompareTo
(textSelection.Start) == 0) &&
213
(findResult.End.
CompareTo
(textSelection.End) == 0))
233
if (contentStart != null && contentEnd != null && contentStart.
CompareTo
(contentEnd) != 0)
237
if (contentStart.
CompareTo
(contentEnd) > 0)
src\Framework\MS\Internal\Documents\HostedElements.cs (4)
105
Debug.Assert(((ITextPointer)_currentPosition).
CompareTo
(_textSegments[_currentTextSegment].Start) >= 0 &&
106
((ITextPointer)_currentPosition).
CompareTo
(_textSegments[_currentTextSegment].End) < 0);
116
Debug.Assert(((ITextPointer)_currentPosition).
CompareTo
(_textSegments[_currentTextSegment].Start) >= 0);
117
while (((ITextPointer)_currentPosition).
CompareTo
(_textSegments[_currentTextSegment].End) < 0)
src\Framework\MS\Internal\Documents\MultiPageTextView.cs (3)
166
ITextPointer startPositionInTextSegment = startPosition.
CompareTo
(textSegment.Start) > 0 ? startPosition : textSegment.Start;
167
ITextPointer endPositionInTextSegment = endPosition.
CompareTo
(textSegment.End) < 0 ? endPosition : textSegment.End;
169
if (startPositionInTextSegment.
CompareTo
(endPositionInTextSegment) >= 0)
src\Framework\MS\Internal\Documents\ParagraphResult.cs (3)
438
contains = (position.
CompareTo
(this.EndPosition) == 0);
1098
ITextPointer endPositionInThisPara = endPosition.
CompareTo
(this.EndPosition) < 0 ? endPosition : this.EndPosition;
1271
ITextPointer endPositionInThisPara = endPosition.
CompareTo
(this.EndPosition) < 0 ? endPosition : this.EndPosition;
src\Framework\MS\Internal\Documents\TextContainerHelper.cs (3)
324
while (start.
CompareTo
(end) < 0)
402
Invariant.Assert(elementStart.
CompareTo
(ownerContentStart) >= 0);
409
if (position.
CompareTo
(ownerContentStart) <= 0)
src\Framework\MS\Internal\Documents\TextDocumentView.cs (34)
162
ITextPointer startPositionInThisSegment = startPosition.
CompareTo
(textSegment.Start) > 0 ? startPosition : textSegment.Start;
163
ITextPointer endPositionInThisSegment = endPosition.
CompareTo
(textSegment.End) < 0 ? endPosition : textSegment.End;
166
if (startPositionInThisSegment.
CompareTo
(endPositionInThisSegment) >= 0)
482
if (segment.Start.
CompareTo
(position) < 0 && segment.End.
CompareTo
(position) > 0)
487
if (segment.Start.
CompareTo
(position) == 0)
506
if (segment.End.
CompareTo
(position) == 0)
531
if (position.TextContainer.Start.
CompareTo
(position) == 0 && position.LogicalDirection == LogicalDirection.Backward)
533
contains = (position.TextContainer.Start.
CompareTo
(segments[0].Start) == 0);
535
else if (position.TextContainer.End.
CompareTo
(position) == 0 && position.LogicalDirection == LogicalDirection.Forward)
537
contains = (position.TextContainer.End.
CompareTo
(segments[segments.Count - 1].End) == 0);
1292
if (endPosition.
CompareTo
(paragraphs[i].StartPosition) <= 0)
1299
if (startPosition.
CompareTo
(paragraphs[i].EndPosition) > 0)
1388
if (!(startPosition.
CompareTo
(floatingElements[i].StartPosition) > 0 &&
1389
endPosition.
CompareTo
(floatingElements[i].EndPosition) < 0))
2161
if (position.
CompareTo
(columns[0].StartPosition) == 0)
2165
else if (position.
CompareTo
(columns[columns.Count - 1].EndPosition) == 0)
2237
if (position.
CompareTo
(paragraphs[paragraphIndex].StartPosition) < 0)
2257
if (position.
CompareTo
(paragraphs[0].StartPosition) == 0)
2261
else if (position.
CompareTo
(paragraphs[paragraphs.Count - 1].EndPosition) == 0)
3150
if (start.
CompareTo
(tpr.EndPosition) < 0 && end.
CompareTo
(tpr.StartPosition) > 0)
3152
ITextPointer startRange = start.
CompareTo
(tpr.StartPosition) < 0 ? tpr.StartPosition : start;
3153
ITextPointer endRange = end.
CompareTo
(tpr.EndPosition) < 0 ? end : tpr.EndPosition;
3157
if (end.
CompareTo
(tpr.EndPosition) < 0)
3203
ITextPointer endThisPara = end.
CompareTo
(paragraph.EndPosition) < 0 ? end : paragraph.EndPosition;
3254
if (start.
CompareTo
(columnResult.StartPosition) >= 0 && start.
CompareTo
(columnResult.EndPosition) <= 0)
3260
if (end.
CompareTo
(columnResult.StartPosition) >= 0 && end.
CompareTo
(columnResult.EndPosition) <= 0)
3492
if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.
CompareTo
(textElement.ElementStart) == 0)
3497
if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.
CompareTo
(textElement.ElementEnd) == 0)
3526
if (textPointer.
CompareTo
(textElement.ContentStart) == 0)
3531
if (textPointer.
CompareTo
(textElement.ContentEnd) == 0)
src\Framework\MS\Internal\PtsHost\BreakRecordTable.cs (2)
454
if (start.
CompareTo
(dependentMax) <= 0)
464
if (start.
CompareTo
(textSegment.End) <= 0)
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (2)
1064
if(textPointer.TextContainer.Start.
CompareTo
(textPointer) > 0)
1128
Invariant.Assert(textPointer.
CompareTo
(textPointer.TextContainer.End) == 0);
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (3)
982
while (elementPosition == null && ((ITextPointer)searchPosition).
CompareTo
(_structuralCache.TextContainer.End) < 0)
1017
if (((ITextPointer)elementPosition).
CompareTo
(((ITextView)_textView).TextSegments[segmentIndex].Start) >= 0 &&
1018
((ITextPointer)elementPosition).
CompareTo
(((ITextView)_textView).TextSegments[segmentIndex].End) < 0)
src\Framework\MS\Internal\PtsHost\Line.cs (1)
212
position.
CompareTo
(startPosition) != 0)
src\Framework\MS\Internal\PtsHost\OptimalTextSource.cs (1)
162
position.
CompareTo
(startPosition) != 0)
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (4)
923
if (endPosition.
CompareTo
(cpc.Cell.ContentStart) <= 0)
933
if (startPosition.
CompareTo
(cpc.Cell.ContentEnd) <= 0)
996
if(position.
CompareTo
(cpc.Cell.ContentStart) >= 0 && position.
CompareTo
(cpc.Cell.ContentEnd) <= 0)
src\Framework\MS\Internal\PtsHost\UIElementParaClient.cs (2)
153
if (startPosition.
CompareTo
(((BlockUIContainer)Paragraph.Element).ContentEnd) < 0 &&
154
endPosition.
CompareTo
(((BlockUIContainer)Paragraph.Element).ContentStart) > 0)
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
101
position.
CompareTo
(_owner.TextContainer.Start) != 0)
src\Framework\System\Windows\Annotations\AnnotationHelper.cs (8)
852
if (((selection.Start.
CompareTo
(anchor.Start) > 0) && (selection.Start.
CompareTo
(anchor.End) < 0)) ||
853
((selection.End.
CompareTo
(anchor.Start) > 0) && (selection.End.
CompareTo
(anchor.End) < 0)) ||
854
((selection.Start.
CompareTo
(anchor.Start) <= 0) && (selection.End.
CompareTo
(anchor.End) >= 0)) ||
876
if (((anchor.Start.
CompareTo
(selection.Start) == 0) &&
878
((anchor.End.
CompareTo
(selection.End) == 0) &&
src\Framework\System\Windows\Controls\PasswordTextContainer.cs (2)
279
return ((ITextPointer)position1.Handle0).
CompareTo
((ITextPointer)position2.Handle0);
284
return ((ITextPointer)position1.Handle0).
CompareTo
(position2);
src\Framework\System\Windows\Controls\PasswordTextNavigator.cs (1)
109
return ((ITextPointer)this).
CompareTo
((ITextPointer)position.Handle0);
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (2)
819
if (textSegment.Start.
CompareTo
(masterPointer) < 0)
828
if (textSegment.End.
CompareTo
(masterPointer) > 0)
src\Framework\System\Windows\Controls\TextAdaptor.cs (6)
112
if (!textView.Contains(start) && start.
CompareTo
(textSegments[0].Start) < 0)
116
if (!textView.Contains(end) && end.
CompareTo
(textSegments[textSegments.Count-1].End) > 0)
142
while (position.
CompareTo
(end) < 0)
149
ITextPointer first = (lineRange.Start.
CompareTo
(start) <= 0) ? start : lineRange.Start;
150
ITextPointer last = (lineRange.End.
CompareTo
(end) >= 0) ? end : lineRange.End;
600
while (position.
CompareTo
(_textContainer.End) < 0)
src\Framework\System\Windows\Controls\TextBlock.cs (1)
2370
Invariant.Assert(startPosition.
CompareTo
(endPosition) <= 0);
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (43)
472
Invariant.Assert(start.
CompareTo
(end) <= 0, "Invalid range, end < start.");
616
if (_start.
CompareTo
(lineRange.Start) != 0)
625
if (_end.
CompareTo
(lineRange.End) != 0)
638
if (_end.
CompareTo
(lineRange.End) != 0)
651
if (expandStart && _start.
CompareTo
(textRange.Start) != 0)
661
if (_end.
CompareTo
(textRange.End) != 0)
689
if (_start.
CompareTo
(textSegments[0].Start) != 0)
706
if (_end.
CompareTo
(textSegments[textSegments.Count - 1].End) != 0)
716
if (expandStart && _start.
CompareTo
(_start.TextContainer.Start) != 0)
720
if (expandEnd && _end.
CompareTo
(_start.TextContainer.End) != 0)
821
if (position.
CompareTo
(nextLineStart) != 0)
848
if (position.
CompareTo
(previousLineEnd) != 0)
878
if (position.
CompareTo
(nextParagraphStart) != 0)
899
if (position.
CompareTo
(previousParagraphEnd) != 0)
933
while (position.
CompareTo
(textSegments[textSegments.Count - 1].End) != 0)
947
while (position.
CompareTo
(textSegments[0].Start) != 0)
967
if (position.
CompareTo
(GetInsertionPosition(position.TextContainer.End, LogicalDirection.Backward)) != 0)
975
if (position.
CompareTo
(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0)
1176
if (positionTemp.
CompareTo
(position) <= 0)
1183
if (positionTemp.
CompareTo
(position) >= 0)
1218
if (start.
CompareTo
(end) < 0)
1224
if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.
CompareTo
(end) >= 0)
1231
if (!end.MoveToNextContextPosition(LogicalDirection.Backward) || start.
CompareTo
(end) >= 0)
1236
if (start.
CompareTo
(end) > 0)
1244
while (start.
CompareTo
(end) < 0 && attr.AreEqual(valueAtEndPos, attr.GetValueAt(start)))
1246
if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.
CompareTo
(end) > 0)
1252
return (start.
CompareTo
(end) >= 0) ? valueAtEndPos : TextPatternIdentifiers.MixedAttributeValue;
1506
if (_start.
CompareTo
(_end) > 0)
1611
return (rangeAdaptor._start.
CompareTo
(_start) == 0 && rangeAdaptor._end.
CompareTo
(_end) == 0);
1638
return position.
CompareTo
(targetPosition);
1698
while (position.
CompareTo
(stop) > 0)
1729
while (position.
CompareTo
(stop) < 0)
1780
if (_start.
CompareTo
(_end) == 0)
1921
if ((position.
CompareTo
(_start)==0 && position.LogicalDirection != _start.LogicalDirection) ||
1922
(count > 0 && position.
CompareTo
(_start) > 0) ||
1923
(count < 0 && position.
CompareTo
(_start) < 0))
1981
if ((count > 0 && position.
CompareTo
(positionRef) > 0) ||
1982
(count < 0 && position.
CompareTo
(positionRef) < 0) ||
1983
(position.
CompareTo
(positionRef) == 0 && position.LogicalDirection != positionRef.LogicalDirection))
2005
if (_start.
CompareTo
(_end) > 0)
2038
if (_start.
CompareTo
(_end) > 0)
2047
if (_start.
CompareTo
(_end) > 0)
src\Framework\System\Windows\Documents\CompositionAdorner.cs (7)
490
while (start.
CompareTo
(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
579
while (endLinePointer.
CompareTo
(end) < 0)
591
Debug.Assert(start.
CompareTo
(startLinePointer) <= 0, "The start pointer is positioned after the composition start line pointer!");
593
if (startLinePointer.
CompareTo
(textSegment.Start) < 0)
599
if (endLinePointer.
CompareTo
(textSegment.End) < 0)
601
if (end.
CompareTo
(textSegment.End) < 0)
614
Debug.Assert(endLinePointer.
CompareTo
(textSegment.End) == 0, "The end line pointer is positioned after the composition text range end pointer!");
src\Framework\System\Windows\Documents\DocumentSequenceTextContainer.cs (5)
173
return ((ITextPointer)position1.Handle0).
CompareTo
((ITextPointer)position2.Handle0);
178
return ((ITextPointer)position1.Handle0).
CompareTo
(position2);
721
Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.
CompareTo
(((TextSegment)args.Ranges[0]).End) < 0);
771
if (tpChildStart.
CompareTo
(tpChildEnd) != 0)
791
if (tpChildStart.
CompareTo
(tpChildEnd) != 0)
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
66
/// <see cref="ITextPointer.
CompareTo
(ITextPointer)"/>
78
return ((ITextPointer)this).
CompareTo
((ITextPointer)position.Handle0);
607
/// <see cref="ITextPointer.
CompareTo
(ITextPointer)"/>
972
return thisTp.ChildPointer.
CompareTo
(tp.ChildPointer);
src\Framework\System\Windows\Documents\FixedDocument.cs (1)
1080
Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.
CompareTo
(((TextSegment)args.Ranges[0]).End) < 0);
src\Framework\System\Windows\Documents\FixedElement.cs (1)
274
while (pos.
CompareTo
((ITextPointer)_end) < 0)
src\Framework\System\Windows\Documents\FixedTextContainer.cs (4)
158
return ((ITextPointer)position1.Handle0).
CompareTo
((ITextPointer)position2.Handle0);
163
return ((ITextPointer)position1.Handle0).
CompareTo
(position2);
627
Debug.Assert(start.
CompareTo
(end) <= 0);
632
if (start.
CompareTo
(end) == 0)
src\Framework\System\Windows\Documents\FixedTextPointer.cs (1)
80
return ((ITextPointer)this).
CompareTo
((ITextPointer)position.Handle0);
src\Framework\System\Windows\Documents\FixedTextView.cs (2)
424
if (pos.
CompareTo
(position) == 0)
630
if (begin.
CompareTo
(end) > 0)
src\Framework\System\Windows\Documents\NullTextContainer.cs (2)
145
return ((ITextPointer)position1.Handle0).
CompareTo
((ITextPointer)position2.Handle0);
150
return ((ITextPointer)position1.Handle0).
CompareTo
(position2);
src\Framework\System\Windows\Documents\Paragraph.cs (1)
258
while (navigator.
CompareTo
(end) < 0)
src\Framework\System\Windows\Documents\Speller.cs (32)
722
Invariant.Assert(start.
CompareTo
(end) < 0);
733
Invariant.Assert(start.
CompareTo
(end) < 0);
801
if (wordBreakLeft.
CompareTo
(rawEnd) < 0 &&
802
wordBreakRight.
CompareTo
(rawStart) > 0)
804
if (wordBreakLeft.
CompareTo
(rawStart) > 0)
809
else if (wordBreakRight.
CompareTo
(rawEnd) < 0)
872
Invariant.Assert(contentStart.
CompareTo
(contentEnd) < 0);
873
Invariant.Assert(contextStart.
CompareTo
(contextEnd) < 0);
874
Invariant.Assert(contentStart.
CompareTo
(contextStart) >= 0);
875
Invariant.Assert(contentEnd.
CompareTo
(contextEnd) <= 0);
903
if (status.TimeoutPosition.
CompareTo
(end) < 0)
910
if (status.TimeoutPosition.
CompareTo
(start) <= 0)
939
Invariant.Assert(status.TimeoutPosition.
CompareTo
(contentEnd) <= 0);
1097
if (timeoutPosition.
CompareTo
(status.StartPosition) > 0)
1287
if (position.
CompareTo
(contentPosition) < 0)
1291
if (position.
CompareTo
(contextPosition) < 0)
1298
if (position.
CompareTo
(contentPosition) > 0)
1302
if (position.
CompareTo
(contextPosition) > 0)
1430
if (direction == LogicalDirection.Backward && closestErrorPosition.
CompareTo
(searchPosition) > 0 ||
1431
direction == LogicalDirection.Forward && closestErrorPosition.
CompareTo
(searchPosition) < 0)
1441
if (direction == LogicalDirection.Backward && closestLanguageTransition.
CompareTo
(searchPosition) > 0 ||
1442
direction == LogicalDirection.Forward && closestLanguageTransition.
CompareTo
(searchPosition) < 0)
1475
while ((direction == LogicalDirection.Forward && navigator.
CompareTo
(haltPosition) < 0) ||
1476
(direction == LogicalDirection.Backward && navigator.
CompareTo
(haltPosition) > 0))
1485
if ((direction == LogicalDirection.Forward && navigator.
CompareTo
(haltPosition) > 0) ||
1486
(direction == LogicalDirection.Backward && navigator.
CompareTo
(haltPosition) < 0))
1787
Invariant.Assert(contextStart.
CompareTo
(contentStart) <= 0);
1788
Invariant.Assert(contextEnd.
CompareTo
(contentEnd) >= 0);
1806
while (position.
CompareTo
(contextEnd) < 0)
1808
if (position.
CompareTo
(contentStart) == 0)
1812
if (position.
CompareTo
(contentEnd) == 0)
1873
if (position.
CompareTo
(contentEnd) == 0)
src\Framework\System\Windows\Documents\SpellerError.cs (1)
32
Invariant.Assert(start.
CompareTo
(end) < 0);
src\Framework\System\Windows\Documents\SpellerHighlightLayer.cs (1)
204
Invariant.Assert(start.
CompareTo
(end) < 0, "Bogus start/end combination!");
src\Framework\System\Windows\Documents\SpellerStatusTable.cs (8)
135
Invariant.Assert(run.Position.
CompareTo
(start) <= 0);
138
if (run.Position.
CompareTo
(start) == 0)
383
if (start.
CompareTo
(end) == 0)
446
Invariant.Assert(start.
CompareTo
(end) < 0);
461
if (run.Position.
CompareTo
(start) >= 0)
627
if (runPosition.
CompareTo
(position) > 0 && runPosition.CompareTo(GetRunEndPosition(i)) != 0)
664
if (errorStart.
CompareTo
(errorEnd) != 0) // errorStart == errorEnd if content was deleted.
691
Invariant.Assert(run.Position.
CompareTo
(run.Position.TextContainer.Start) == 0);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
491
dropPosition.
CompareTo
(lineRange.End) < 0 &&
644
if (dropPosition.
CompareTo
(textSegment.End) == 0)
src\Framework\System\windows\Documents\TextEditorSelection.cs (15)
537
if (This.Selection.Start.
CompareTo
(paragraphRange.Start) > 0)
651
if (targetPosition.
CompareTo
(movingPosition) <= 0)
765
if (targetPosition.
CompareTo
(movingPosition) >= 0)
1132
int newComparedToOld = newMovingPosition.
CompareTo
(originalMovingPosition);
1251
int newComparedToOld = newMovingPosition.
CompareTo
(originalMovingPosition);
1385
if (movingPointer.
CompareTo
(paragraphRange.Start) > 0)
1479
if (targetPosition.
CompareTo
(movingPosition) <= 0)
1575
if (targetPosition.
CompareTo
(movingPosition) >= 0)
1670
if (lineRange.End.
CompareTo
(This.Selection.End) < 0)
1687
if (!lineRange.IsNull && anchorLineRange.Start.
CompareTo
(This.Selection.AnchorPosition) == 0)
1869
int newComparedToOld = e.NewPosition.
CompareTo
(e.Position);
1932
int newComparedToOld = e.NewPosition.
CompareTo
(e.Position);
2264
if (This.Selection.MovingPosition.
CompareTo
(innerMovingPosition) > 0)
2331
This.Selection.Start.
CompareTo
(movingPosition) < 0 &&
2370
if (end.
CompareTo
(This.Selection.MovingPosition) == 0)
src\Framework\System\windows\Documents\TextEditorSpelling.cs (6)
188
while (textStart.
CompareTo
(spellingError.End) < 0 &&
194
while (textEnd.
CompareTo
(spellingError.Start) > 0 &&
201
textStart.
CompareTo
(spellingError.End) == 0)
206
textEnd.
CompareTo
(spellingError.Start) != 0);
264
(limit == null || position.
CompareTo
(limit) < 0))
313
if (position.
CompareTo
(limit) == 0)
src\Framework\System\windows\Documents\TextEditorTyping.cs (2)
688
if (backspacePosition.
CompareTo
(position) == 0)
733
Invariant.Assert(backspacePosition.
CompareTo
(position) < 0);
src\Framework\System\Windows\Documents\TextFindEngine.cs (9)
102
|| findContainerStartPosition.
CompareTo
(findContainerEndPosition) == 0
195
Invariant.Assert(startPosition.
CompareTo
(endPosition) <= 0);
225
while ((matchLast ? startPosition.
CompareTo
(navigator) : navigator.
CompareTo
(endPosition)) < 0)
338
if (position.
CompareTo
(nextPosition) > 0)
661
Invariant.Assert(startPosition.
CompareTo
(navigator) <= 0);
662
Invariant.Assert(endPosition.
CompareTo
(navigator) >= 0);
675
while ((matchLast ? startPosition.
CompareTo
(navigator) : navigator.
CompareTo
(endPosition)) < 0)
src\Framework\System\Windows\Documents\TextPointerBase.cs (17)
42
return position1.
CompareTo
(position2) <= 0 ? position1 : position2;
56
return position1.
CompareTo
(position2) >= 0 ? position1 : position2;
87
else if (direction == LogicalDirection.Forward && limit.
CompareTo
(thisPointer) <= 0)
92
else if (direction == LogicalDirection.Backward && limit.
CompareTo
(thisPointer) >= 0)
573
if (wordStart.
CompareTo
(wordEnd) < 0)
584
Invariant.Assert(wordStart.
CompareTo
(wordEnd) <= 0, "expecting wordStart <= wordEnd");
590
Invariant.Assert(!(direction == LogicalDirection.Backward) || position.
CompareTo
(limit) >= 0, "for backward direction position must be >= than limit");
591
Invariant.Assert(!(direction == LogicalDirection.Forward) || position.
CompareTo
(limit) <= 0, "for forward direcion position must be <= than linit");
593
while (direction == LogicalDirection.Backward ? position.
CompareTo
(limit) > 0 : position.
CompareTo
(limit) < 0)
705
? position.
CompareTo
(lineSegment.Start) == 0
706
: position.
CompareTo
(lineSegment.End) == 0;
987
if ((direction == LogicalDirection.Forward && initialPosition.
CompareTo
(thisNavigator) < 0) ||
988
(direction == LogicalDirection.Backward && thisNavigator.
CompareTo
(initialPosition) < 0))
1044
Invariant.Assert(thisNavigator.
CompareTo
(initialPosition) > 0, "thisNavigator is expected to be moved from initialPosition - 1");
1048
Invariant.Assert(thisNavigator.
CompareTo
(initialPosition) < 0, "thisNavigator is expected to be moved from initialPosition - 2");
1053
Invariant.Assert(thisNavigator.
CompareTo
(initialPosition) == 0, "thisNavigator must stay at initial position");
src\Framework\System\Windows\Documents\TextRangeBase.cs (15)
80
if (textPointer.
CompareTo
(thisRange.Start) < 0)
84
else if (textPointer.
CompareTo
(thisRange.End) > 0)
415
while (moved && position.
CompareTo
(textSegment.End) < 0)
490
while (moved && position.
CompareTo
(textSegment.End) <= 0)
686
Invariant.Assert(startPosition.
CompareTo
(endPosition) <= 0, "expecting: startPosition <= endPosition");
688
while (navigator.
CompareTo
(endPosition) < 0)
1227
(thisRange.Start.
CompareTo
(thisRange.End) == 0),
1735
if (start.
CompareTo
(end) == 0)
1757
if (start.
CompareTo
(end) >= 0)
1782
Invariant.Assert(start.
CompareTo
(end) <= 0, "expecting start <= end");
1785
if (start.
CompareTo
(end) == 0)
1978
else if (start.
CompareTo
(end) == 0)
2055
if (position1.
CompareTo
(position2) > 0)
2072
if (finalStart.
CompareTo
(newStart) != 0 || finalEnd.
CompareTo
(newEnd) != 0)
src\Framework\System\Windows\Documents\TextRangeEdit.cs (2)
1252
if (rangeStart.
CompareTo
(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart)
1417
Invariant.Assert(start.
CompareTo
(end) <= 0, "expecting: start <= end");
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (1)
414
if (segment.Start.
CompareTo
(segment.End) != 0)
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (5)
168
if (((ITextPointer)fragment.ContentStart).
CompareTo
(fragment.ContentEnd) == 0)
223
while (textReader.
CompareTo
(rangeEnd) < 0)
1883
if (elementEnd.
CompareTo
(rangeEnd) > 0)
1917
if (hyperlinkEnd.
CompareTo
(rangeEnd) > 0)
1924
while (hyperlinkNavigation.
CompareTo
(hyperlinkEnd) < 0)
src\Framework\System\windows\Documents\TextSegment.cs (4)
67
if (startPosition.
CompareTo
(endPosition) == 0)
77
Invariant.Assert(startPosition.
CompareTo
(endPosition) < 0);
99
return (!this.IsNull && this._start.
CompareTo
(position) <= 0 && position.
CompareTo
(this._end) <= 0);
src\Framework\System\windows\Documents\TextSelection.cs (16)
626
if (movingPosition.
CompareTo
(movingPosition.TextContainer.End) != 0)
642
LogicalDirection contentDirection = (anchorPosition.
CompareTo
(newMovingPosition) <= 0) ?
819
if (forceParagraphSelection || _previousCursorPosition != null && cursorPosition.
CompareTo
(_previousCursorPosition) == 0)
844
if (anchorWordRange.Start.
CompareTo
(cursorWordRange.Start) <= 0)
935
(anchorPosition.
CompareTo
(cursorPosition) < 0 && cursorPosition.
CompareTo
(_previousCursorPosition) < 0 ||
936
_previousCursorPosition.
CompareTo
(cursorPosition) < 0 && cursorPosition.
CompareTo
(anchorPosition) < 0))
1883
if (_anchorPosition.
CompareTo
(thisSelection.Start) < 0)
1887
else if (_anchorPosition.
CompareTo
(thisSelection.End) > 0)
1911
movingEdge = (anchorPosition.
CompareTo
(movingPosition) <= 0) ? MovingEdge.End : MovingEdge.Start;
1916
if (movingPosition.
CompareTo
(thisSelection.Start) == 0)
1920
else if (movingPosition.
CompareTo
(thisSelection.End) == 0)
1924
else if (movingPosition.
CompareTo
(thisSelection.TextSegments[0].End) == 0)
1928
else if (movingPosition.
CompareTo
(thisSelection.TextSegments[thisSelection.TextSegments.Count-1].Start) == 0)
1934
movingEdge = (anchorPosition.
CompareTo
(movingPosition) <= 0) ? MovingEdge.End : MovingEdge.Start;
src\Framework\System\windows\Documents\TextSelectionHighlightLayer.cs (9)
143
if (textSegment.Start.
CompareTo
(textSegment.End) != 0)
164
if (textSegment.Start.
CompareTo
(textSegment.End) != 0)
221
if (_oldStart.
CompareTo
(newStart) < 0)
233
if (_oldEnd.
CompareTo
(newEnd) < 0)
249
if (invalidRangeLeftStart.
CompareTo
(invalidRangeLeftEnd) != 0 || invalidRangeRightStart.
CompareTo
(invalidRangeRightEnd) != 0)
317
return textRange._TextSegments[0].Start.
CompareTo
(textRange._TextSegments[textRange._TextSegments.Count - 1].End) == 0;
341
if (invalidRangeLeftStart.
CompareTo
(invalidRangeLeftEnd) == 0)
346
else if (invalidRangeRightStart.
CompareTo
(invalidRangeRightEnd) == 0)
src\Framework\System\Windows\Documents\TextStore.cs (28)
251
selection[0].style.ase = (this.TextSelection.MovingPosition.
CompareTo
(this.TextSelection.Start) == 0) ? UnsafeNativeMethods.TsActiveSelEnd.TS_AE_START : UnsafeNativeMethods.TsActiveSelEnd.TS_AE_END;
343
hitLimit = (limit != null && navigator.
CompareTo
(limit) >= 0);
349
hitLimit = (limit != null && navigator.
CompareTo
(limit) >= 0);
389
if (start.
CompareTo
(end) > 0)
621
if (start.
CompareTo
(this.TextSelection.Start) != 0 ||
622
end.
CompareTo
(this.TextSelection.End) != 0)
954
ITextPointer start = (lineRange.Start.
CompareTo
(startPointer) <= 0) ? startPointer : lineRange.Start;
955
end = (lineRange.End.
CompareTo
(endPointer) >= 0) ? endPointer : lineRange.End;
973
if (end.
CompareTo
(endPointer) == 0)
1136
if (this.TextEditor.AcceptsRichContent && start.
CompareTo
(end) != 0)
1649
if ((compositionStart.
CompareTo
(TextSelection.Start) <= 0) &&
1650
(compositionStart.
CompareTo
(TextSelection.End) <= 0) &&
1651
(compositionEnd.
CompareTo
(TextSelection.Start) >= 0) &&
1652
(compositionEnd.
CompareTo
(TextSelection.End) >= 0))
2319
Invariant.Assert(limit == null || navigator.
CompareTo
(limit) <= 0);
2328
hitLimit = (text.Length == charsCopied) || (limit != null && navigator.
CompareTo
(limit) == 0);
2341
if (navigator.
CompareTo
(limit) >= 0)
2378
Invariant.Assert(limit == null || navigator.
CompareTo
(limit) <= 0);
2380
if (limit != null && navigator.
CompareTo
(limit) == 0)
2420
Invariant.Assert(limit == null || navigator.
CompareTo
(limit) <= 0);
2426
if (navigator.
CompareTo
(limit) >= 0)
2441
hitLimit = (text.Length == charsCopied) || (limit != null && navigator.
CompareTo
(limit) == 0);
2805
while (start.
CompareTo
(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)
3061
if (compositionStart != null && compositionStart.
CompareTo
(this.TextSelection.Start) > 0)
3098
while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.
CompareTo
(end) < 0)
3318
if (startIn.
CompareTo
(endIn) != 0)
3391
while (start.
CompareTo
(end) < 0)
3418
if (start.
CompareTo
(end) == 0)
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
72
if (startPosition.
CompareTo
(endPosition) > 0)