ITagAggregator<T>.GetTags Method

Definition

Overloads

GetTags(IMappingSpan)

Gets all the tags that intersect the specified span of the type of the aggregator.

GetTags(NormalizedSnapshotSpanCollection)

Gets all the tags that intersect the specified snapshotSpans of the type of the aggregator.

GetTags(SnapshotSpan)

Gets all the tags that intersect the specified span of the same type as the aggregator.

GetTags(IMappingSpan)

Gets all the tags that intersect the specified span of the type of the aggregator.

public:
 System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Tagging::IMappingTagSpan<T> ^> ^ GetTags(Microsoft::VisualStudio::Text::IMappingSpan ^ span);
public System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<out T>> GetTags (Microsoft.VisualStudio.Text.IMappingSpan span);
abstract member GetTags : Microsoft.VisualStudio.Text.IMappingSpan -> seq<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<'T>>
Public Function GetTags (span As IMappingSpan) As IEnumerable(Of IMappingTagSpan(Of Out T))

Parameters

span
IMappingSpan

The span to search.

Returns

All the tags that intersect the region.

Remarks

The default tag aggregator lazily enumerates the tags of its ITagger<T> objects. Because of this, the ordering of the returned mapping spans cannot be predicted. If you need an ordered set of spans, you should collect the returned tag spans, after being mapped to the buffer of interest, into a sortable collection.

Applies to

GetTags(NormalizedSnapshotSpanCollection)

Gets all the tags that intersect the specified snapshotSpans of the type of the aggregator.

public:
 System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Tagging::IMappingTagSpan<T> ^> ^ GetTags(Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ snapshotSpans);
public System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<out T>> GetTags (Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection snapshotSpans);
abstract member GetTags : Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection -> seq<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<'T>>
Public Function GetTags (snapshotSpans As NormalizedSnapshotSpanCollection) As IEnumerable(Of IMappingTagSpan(Of Out T))

Parameters

snapshotSpans
NormalizedSnapshotSpanCollection

The spans to search.

Returns

All the tags that intersect the region.

Remarks

The default tag aggregator lazily enumerates the tags of its ITagger<T> objects. Because of this, the ordering of the returned mapping spans cannot be predicted. If you need an ordered set of spans, you should collect the returned tag spans, after being mapped to the buffer of interest, into a sortable collection.

Applies to

GetTags(SnapshotSpan)

Gets all the tags that intersect the specified span of the same type as the aggregator.

public:
 System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Tagging::IMappingTagSpan<T> ^> ^ GetTags(Microsoft::VisualStudio::Text::SnapshotSpan span);
public System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<out T>> GetTags (Microsoft.VisualStudio.Text.SnapshotSpan span);
abstract member GetTags : Microsoft.VisualStudio.Text.SnapshotSpan -> seq<Microsoft.VisualStudio.Text.Tagging.IMappingTagSpan<'T>>
Public Function GetTags (span As SnapshotSpan) As IEnumerable(Of IMappingTagSpan(Of Out T))

Parameters

span
SnapshotSpan

The span to search.

Returns

All the tags that intersect the region.

Remarks

The default tag aggregator lazily enumerates the tags of its ITagger<T> objects. Because of this, the ordering of the returned mapping spans cannot be predicted. If you need an ordered set of spans, you should collect the returned tag spans, after being mapped to the buffer of interest, into a sortable collection.

Applies to