This documentation is archived and is not being maintained.

ITagger<T> Interface

A provider of tags over a buffer.

Namespace:  Microsoft.VisualStudio.Text.Tagging
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

public interface ITagger<out T>
where T : ITag

Type Parameters

out T

The type of tags to generate.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

The ITagger<T> type exposes the following members.

Public methodGetTagsGets all the tags that intersect the specified spans.

Public eventTagsChangedOccurs when tags are added to or removed from the provider.

For more information about tagging, see the "Tags and Classifiers" section of Inside the Editor. For information about extending and adding tags, see the "Extending Tags" section of Editor Extension Points.