In This Article

IIndicatorManager Interface

Provides the base requirements for a manager that works with the indicators associated with an IEditorDocument.

public interface IIndicatorManager

Properties

Bookmarks

Gets the IBookmarkIndicatorManager that can be used to manage bookmark indicators.

IBookmarkIndicatorManager Bookmarks { get; }

Property Value

IBookmarkIndicatorManager:

The IBookmarkIndicatorManager that can be used to manage bookmark indicators.

Breakpoints

Gets the IBreakpointIndicatorManager that can be used to manage breakpoint indicators.

IBreakpointIndicatorManager Breakpoints { get; }

Property Value

IBreakpointIndicatorManager:

The IBreakpointIndicatorManager that can be used to manage breakpoint indicators.

CurrentStatement

Gets the ICurrentStatementIndicatorManager that can be used to manage a current statement indicator.

ICurrentStatementIndicatorManager CurrentStatement { get; }

Property Value

ICurrentStatementIndicatorManager:

The ICurrentStatementIndicatorManager that can be used to manage a current statement indicator.

Document

Gets the document to which this manager is attached.

IEditorDocument Document { get; }

Property Value

IEditorDocument:

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>:

The TagVersionRange<T> that was found, if any.

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>:

The TagVersionRange<T> that was found, if any.

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

int:

The number of indicators.

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>:

The indicator tag range that points to the specified tag.

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>>:

The collection of indicator tag ranges.

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>>:

The collection of indicator tag ranges.

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>>:

The collection of indicator tag ranges.

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:

true if 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.