次の方法で共有


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)

Syntax

'宣言
Public Interface ITagger(Of Out T As ITag)
public interface ITagger<out T>
where T : ITag
generic<typename T>
where T : ITag
public interface class ITagger
type ITagger<'T when 'T : ITag> =  interface end
JScript does not support generic types or methods.

Type Parameters

  • outT
    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.

Methods

  Name Description
Public method GetTags Gets all the tags that intersect the specified spans.

Top

Events

  Name Description
Public event TagsChanged Occurs when tags are added to or removed from the provider.

Top

Remarks

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.

Examples

For examples of using this interface, see the following walkthroughs:

Walkthrough: Highlighting Text

Walkthrough: Outlining

Walkthrough: Displaying Matching Braces

Walkthrough: Displaying SmartTags

Walkthrough: Creating a Margin Glyph

See Also

Reference

Microsoft.VisualStudio.Text.Tagging Namespace