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