다음을 통해 공유


SimpleTagger<T> Class

Definition

Provides simple, thread-safe storage of and interaction with tags of the given type.

generic <typename T>
 where T : ITagpublic ref class SimpleTagger : Microsoft::VisualStudio::Text::Tagging::ITagger<T>
public class SimpleTagger<T> : Microsoft.VisualStudio.Text.Tagging.ITagger<T> where T : ITag
type SimpleTagger<'T (requires 'T :> ITag)> = class
    interface ITagger<'T (requires 'T :> ITag)>
Public Class SimpleTagger(Of T)
Implements ITagger(Of T)

Type Parameters

T

The type, which must be a subtype of ITag.

Inheritance
SimpleTagger<T>
Implements

Constructors

SimpleTagger<T>(ITextBuffer)

Initializes a new instance of SimpleTagger<T> for the specified buffer.

Methods

CreateTagSpan(ITrackingSpan, T)

Adds a tag over the given span.

GetTaggedSpans(SnapshotSpan)

Gets the tagged spans that intersect the given SnapshotSpan.

GetTags(NormalizedSnapshotSpanCollection)

Gets all the tags that intersect the spans in the specified snapshot of the desired type.

RemoveTagSpan(TrackingTagSpan<T>)

Removes a tag span that was created by calling CreateTagSpan(ITrackingSpan, T).

RemoveTagSpans(Predicate<TrackingTagSpan<T>>)

Removes all tag spans that match the conditions specified by the predicate.

Update()

Gets an IDisposable object that represents an update batch.

Events

TagsChanged

Occurs when one or more tags have been added or removed.

Applies to