ILineIndicatorManager<TTagger, TTag> Interface
Provides the base requirements for a class containing helper methods related to working with an IEditorDocument's line-based indicators.
public interface ILineIndicatorManager<TTagger, TTag> where TTagger : class, ICollectionTagger<TTag> where TTag : IIndicatorTag, new()
- Type Parameters:
-
TTagger
-TTag
-
Properties
Count
Gets the number of indicators.
this[TTag]
Gets the tag range that points to the specified indicator tag.
[C#] In C#, this property is the indexer for the type.
TagVersionRange<TTag> this[TTag tag] { get; }
Parameter | Type | Description |
---|---|---|
tag | TTag | The indicator tag for which to search. |
Property Value
- TagVersionRange<TTag>:
The indicator tag range that points to the specified tag.
Methods
Add(ITextSnapshotLine)
Adds a new indicator that is associated with a single snapshot line.
TagVersionRange<TTag> Add(ITextSnapshotLine snapshotLine)
Parameter | Type | Description |
---|---|---|
snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created.
Add(ITextSnapshotLine, TTag)
Adds a new indicator that is associated with a single snapshot line.
TagVersionRange<TTag> Add(ITextSnapshotLine snapshotLine, TTag tag)
Parameter | Type | Description |
---|---|---|
snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
tag | TTag | The IIndicatorTag to add. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created.
Clear()
Removes all indicators.
void Clear()
FindNext(ITextSnapshotLine, ITagSearchOptions<TTag>)
Finds the next line-based indicator, using the specified search options.
TagVersionRange<TTag> FindNext(ITextSnapshotLine snapshotLine, ITagSearchOptions<TTag> options)
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>:
The TagVersionRange<T> that was found, if any.
GetInstances()
Returns all indicator tag ranges.
IEnumerable<TagVersionRange<TTag>> GetInstances()
Returns
- IEnumerable<TagVersionRange<TTag>>:
The collection of indicator tag ranges.
GetInstances(ITextSnapshotLine)
Returns all indicator tag ranges that occur within the specified ITextSnapshotLine.
IEnumerable<TagVersionRange<TTag>> GetInstances(ITextSnapshotLine snapshotLine)
Parameter | Type | Description |
---|---|---|
snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
Returns
- IEnumerable<TagVersionRange<TTag>>:
The collection of indicator tag ranges.
Remove(TTag)
Removes a specific indicator.
bool Remove(TTag tag)
Parameter | Type | Description |
---|---|---|
tag | TTag | The IIndicatorTag to remove. |
Returns
- bool:
true
if the tag was removed; otherwise,false
.
RemoveAll(Predicate<TagVersionRange<TTag>>)
Removes all indicator tag ranges that match the conditions defined by the specified predicate.
int RemoveAll(Predicate<TagVersionRange<TTag>> match)
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.
Toggle(ITextSnapshotLine)
Toggles whether an indicator is associated with a single snapshot line.
TagVersionRange<TTag> Toggle(ITextSnapshotLine snapshotLine)
Parameter | Type | Description |
---|---|---|
snapshotLine | ITextSnapshotLine | The target ITextSnapshotLine. |
Returns
- TagVersionRange<TTag>:
The TagVersionRange<T> that was created, if an indicator was added.
Toggle(ITextSnapshotLine, TTag)
Toggles whether an indicator is associated with a single snapshot line.
TagVersionRange<TTag> Toggle(ITextSnapshotLine snapshotLine, TTag tag)
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.