ITextVersion Interface
Provides the base requirements for a version of an ITextDocument.
public interface ITextVersion
Properties
Document
The ITextDocument for which this version applies.
Length
The number of characters in the version.
Next
The next ITextVersion that occurs after this one.
Number
The integer version number associated with this instance.
Operations
The read-only list of ITextChangeRangedOperation objects that can be applied to this text version to generate the next version.
IList<ITextChangeRangedOperation>? Operations { get; }
Property Value
Remarks
This property returns null for the most current version of a document.
Methods
CreateRange(TextRange)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange)
| Parameter | Type | Description |
|---|---|---|
| textRange | TextRange | A TextRange indicating the range of text within this version. |
Returns
CreateRange(TextRange, TextRangeTrackingModes)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange, TextRangeTrackingModes trackingModes)
| Parameter | Type | Description |
|---|---|---|
| textRange | TextRange | A TextRange indicating the range of text within this version. |
| trackingModes | TextRangeTrackingModes | A TextRangeTrackingModes indicating the tracking modes to use. |
Returns
CreateRange(TextRange, Func<TextRangeTrackingModes>)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange, Func<TextRangeTrackingModes> trackingModesFunc)
| Parameter | Type | Description |
|---|---|---|
| textRange | TextRange | A TextRange indicating the range of text within this version. |
| trackingModesFunc | Func<TextRangeTrackingModes> | A function that dynamically returns a TextRangeTrackingModes indicating the tracking modes to use. |
Returns
CreateRange(int, int)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(int startOffset, int length)
| Parameter | Type | Description |
|---|---|---|
| startOffset | int | The start offset in the range. |
| length | int | The length of the range. |
Returns
CreateRange(int, int, TextRangeTrackingModes)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(int startOffset, int length, TextRangeTrackingModes trackingModes)
| Parameter | Type | Description |
|---|---|---|
| startOffset | int | The start offset in the range. |
| length | int | The length of the range. |
| trackingModes | TextRangeTrackingModes | A TextRangeTrackingModes indicating the tracking modes to use. |