IIndicatorManager Interface
Provides the base requirements for a manager that works with the indicators associated with an IEditorDocument.
public interface IIndicatorManager
Properties
Bookmarks
The IBookmarkIndicatorManager that can be used to manage bookmark indicators.
Breakpoints
The IBreakpointIndicatorManager that can be used to manage breakpoint indicators.
CurrentStatement
The ICurrentStatementIndicatorManager that can be used to manage a current statement indicator.
ICurrentStatementIndicatorManager CurrentStatement { get; }
Property Value
Document
The document to which this manager is attached.
Methods
Add<TTagger, TTag>(ITextSnapshotLine, TTag)
Adds a new indicator that is associated with a single snapshot line (e.g., a bookmark indicator).
TagVersionRange<TTag>? Add<TTagger, TTag>(ITextSnapshotLine snapshotLine, TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
| tag | TTag | The IIndicatorTag to add. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created.
Add<TTagger, TTag>(TextSnapshotRange, TTag)
Adds a new indicator that is applied to a snapshot text range (e.g., a breakpoint indicator).
TagVersionRange<TTag>? Add<TTagger, TTag>(TextSnapshotRange snapshotRange, TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotRange | TextSnapshotRange | The target TextSnapshotRange. |
| tag | TTag | The IIndicatorTag to add. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created.
Clear<TTagger, TTag>()
Removes all indicators.
void Clear<TTagger, TTag>() where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
FindNext<TTagger, TTag>(ITextSnapshotLine, ITagSearchOptions<TTag>)
Finds the next line-based indicator (e.g., a bookmark indicator), using the specified search options.
TagVersionRange<TTag>? FindNext<TTagger, TTag>(ITextSnapshotLine snapshotLine, ITagSearchOptions<TTag> options) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotLine | ITextSnapshotLine | The ITextSnapshotLine from which to start the search. |
| options | ITagSearchOptions<TTag> | The optional ITagSearchOptions<T> that specifies search options. |
Returns
- TagVersionRange<TTag>
FindNext<TTagger, TTag>(TextSnapshotOffset, ITagSearchOptions<TTag>)
Finds the next text range-based indicator (e.g., a breakpoint indicator), using the specified search options.
TagVersionRange<TTag>? FindNext<TTagger, TTag>(TextSnapshotOffset snapshotOffset, ITagSearchOptions<TTag> options) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotOffset | TextSnapshotOffset | The TextSnapshotOffset from which to start the search. |
| options | ITagSearchOptions<TTag> | The optional ITagSearchOptions<T> that specifies search options. |
Returns
- TagVersionRange<TTag>
GetCount<TTagger, TTag>()
Returns the number of indicators.
int GetCount<TTagger, TTag>() where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
Returns
GetInstance<TTagger, TTag>(TTag)
Returns the tag range that points to the specified indicator tag.
TagVersionRange<TTag>? GetInstance<TTagger, TTag>(TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| tag | TTag | The indicator tag for which to search. |
Returns
- TagVersionRange<TTag>
GetInstances<TTagger, TTag>()
Returns all indicator tag ranges.
IEnumerable<TagVersionRange<TTag>> GetInstances<TTagger, TTag>() where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
Returns
- IEnumerable<TagVersionRange<TTag>>
GetInstances<TTagger, TTag>(ITextSnapshotLine)
Returns all indicator tag ranges that occur within the specified ITextSnapshotLine.
IEnumerable<TagVersionRange<TTag>> GetInstances<TTagger, TTag>(ITextSnapshotLine snapshotLine) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
Returns
- IEnumerable<TagVersionRange<TTag>>
GetInstances<TTagger, TTag>(TextSnapshotRange)
Returns all indicator tag ranges that occur within the specified TextSnapshotRange.
IEnumerable<TagVersionRange<TTag>> GetInstances<TTagger, TTag>(TextSnapshotRange snapshotRange) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotRange | TextSnapshotRange | The target TextSnapshotRange. |
Returns
- IEnumerable<TagVersionRange<TTag>>
RemoveAll<TTagger, TTag>(Predicate<TagVersionRange<TTag>>)
Removes all indicator tag ranges that match the conditions defined by the specified predicate.
int RemoveAll<TTagger, TTag>(Predicate<TagVersionRange<TTag>> match) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| match | Predicate<TagVersionRange<TTag>> | The predicate that defines the conditions for removal. |
Returns
- int:
The number of indicator tag ranges that were removed.
Remove<TTagger, TTag>(TTag)
Removes a specific indicator.
bool Remove<TTagger, TTag>(TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| tag | TTag | The IIndicatorTag to remove. |
Returns
- bool:
trueif the tag was removed; otherwise,false.
Toggle<TTagger, TTag>(ITextSnapshotLine, TTag)
Toggles whether an indicator is associated with a single snapshot line (e.g., a bookmark indicator).
TagVersionRange<TTag>? Toggle<TTagger, TTag>(ITextSnapshotLine snapshotLine, TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
| tag | TTag | The IIndicatorTag to add, if no indicator is already on the line. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created, if an indicator was added.
Toggle<TTagger, TTag>(TextSnapshotRange, TTag)
Toggles whether an indicator is associated with a snapshot text range (e.g., a breakpoint indicator).
TagVersionRange<TTag>? Toggle<TTagger, TTag>(TextSnapshotRange snapshotRange, TTag tag) where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag
- Type Parameters:
-
TTagger-The indicator tagger type.
TTag-The indicator tag type.
| Parameter | Type | Description |
|---|---|---|
| snapshotRange | TextSnapshotRange | The target TextSnapshotRange. |
| tag | TTag | The IIndicatorTag to add, if no indicator is already on the line. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created, if an indicator was added.