TrackingTextRange Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TrackingTextRange(TextRange, TextRangeTrackingMode) |
Initializes a new instance of a TrackingTextRange with the specified range and tracking mode. |
TrackingTextRange(TextPosition, TextPosition, TextRangeTrackingMode) |
Initializes a new instance of a TrackingTextRange with the specified start point, end point and tracking mode. |
TrackingTextRange(TextPosition, Int32, TextRangeTrackingMode) |
Initializes a new instance of a TrackingTextRange with the specified start point, length and tracking mode. |
TrackingTextRange(ITextDocumentSnapshot, Int32, Int32, TextRangeTrackingMode) |
Initializes a new instance of a TrackingTextRange with the specified start point, length and tracking mode. |
TrackingTextRange(TextRange, TextRangeTrackingMode)
Initializes a new instance of a TrackingTextRange with the specified range and tracking mode.
public TrackingTextRange(Microsoft.VisualStudio.Extensibility.Editor.TextRange range, Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode trackingMode);
new Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange : Microsoft.VisualStudio.Extensibility.Editor.TextRange * Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange
Public Sub New (range As TextRange, trackingMode As TextRangeTrackingMode)
Parameters
- range
- TextRange
The range.
- trackingMode
- TextRangeTrackingMode
The tracking mode.
Applies to
TrackingTextRange(TextPosition, TextPosition, TextRangeTrackingMode)
Initializes a new instance of a TrackingTextRange with the specified start point, end point and tracking mode.
public TrackingTextRange(Microsoft.VisualStudio.Extensibility.Editor.TextPosition start, Microsoft.VisualStudio.Extensibility.Editor.TextPosition end, Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode trackingMode);
new Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange : Microsoft.VisualStudio.Extensibility.Editor.TextPosition * Microsoft.VisualStudio.Extensibility.Editor.TextPosition * Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange
Public Sub New (start As TextPosition, end As TextPosition, trackingMode As TextRangeTrackingMode)
Parameters
- start
- TextPosition
The start position.
- end
- TextPosition
The end position, which must be from the same ITextDocumentSnapshot
- trackingMode
- TextRangeTrackingMode
The tracking mode.
Exceptions
The positions belong to different ITextDocumentSnapshot objects.
The end point comes before the start point.
Applies to
TrackingTextRange(TextPosition, Int32, TextRangeTrackingMode)
Initializes a new instance of a TrackingTextRange with the specified start point, length and tracking mode.
public TrackingTextRange(Microsoft.VisualStudio.Extensibility.Editor.TextPosition start, int length, Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode trackingMode);
new Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange : Microsoft.VisualStudio.Extensibility.Editor.TextPosition * int * Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange
Public Sub New (start As TextPosition, length As Integer, trackingMode As TextRangeTrackingMode)
Parameters
- start
- TextPosition
The starting position.
- length
- Int32
The length of the range.
- trackingMode
- TextRangeTrackingMode
The tracking mode.
Exceptions
length
is negative or
start
+ length
is greater than the length of the snapshot.
Applies to
TrackingTextRange(ITextDocumentSnapshot, Int32, Int32, TextRangeTrackingMode)
Initializes a new instance of a TrackingTextRange with the specified start point, length and tracking mode.
public TrackingTextRange(Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot document, int start, int length, Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode trackingMode);
new Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange : Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot * int * int * Microsoft.VisualStudio.Extensibility.Editor.TextRangeTrackingMode -> Microsoft.VisualStudio.Extensibility.Editor.TrackingTextRange
Public Sub New (document As ITextDocumentSnapshot, start As Integer, length As Integer, trackingMode As TextRangeTrackingMode)
Parameters
- document
- ITextDocumentSnapshot
The text document version on which to base the range.
- start
- Int32
The starting point of the range.
- length
- Int32
The length of the range.
- trackingMode
- TextRangeTrackingMode
The tracking mode.
Exceptions
length
is negative.