ITextPositionRangeCollection Interface
Provides the base requirements for a sorted TextPositionRange collection, with one of the entries marked as primary.
public interface ITextPositionRangeCollection
Properties
Count
The number of ranges in the collection.
IsBlock
Indicates whether the ranges in the collection designate a special rectangular block.
bool IsBlock { get; }
Property Value
- bool:
trueif the ranges in the collection designate a special rectangular block; otherwise,false.
this[int]
The TextPositionRange at the specified index.
TextPositionRange this[int index] { get; }
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index of the TextPositionRange. |
Property Value
Primary
The TextPositionRange that is the primary one.
PrimaryIndex
The index of the primary TextPositionRange within the collection.
Methods
BinarySearch(TextPosition)
Performs a binary search for the specified value.
int BinarySearch(TextPosition value)
| Parameter | Type | Description |
|---|---|---|
| value | TextPosition | The value for which to search. |
Returns
- int:
The index of the specified value in the specified array, if value is found. If value is not found and value is less than one or more elements in array, a negative number which is the bitwise complement of the index of the first element that is larger than value. If value is not found and value is greater than any of the elements in array, a negative number which is the bitwise complement of (the index of the last element plus 1).