Compartilhar via


SimpleTagger<T> Class

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

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Text.Tagging.SimpleTagger<T>

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

Syntax

'Declaração
Public Class SimpleTagger(Of T As ITag) _
    Implements ITagger(Of T)
public class SimpleTagger<T> : ITagger<T>
where T : ITag
generic<typename T>
where T : ITag
public ref class SimpleTagger : ITagger<T>
type SimpleTagger<'T when 'T : ITag> =  
    class
        interface ITagger<'T>
    end
JScript does not support generic types or methods.

Type Parameters

  • T
    The type, which must be a subtype of ITag.

The SimpleTagger<T> type exposes the following members.

Constructors

  Name Description
Public method SimpleTagger<T> Initializes a new instance of SimpleTagger<T> for the specified buffer.

Top

Methods

  Name Description
Public method CreateTagSpan Adds a tag over the given span.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetTaggedSpans Gets the tagged spans that intersect the given SnapshotSpan.
Public method GetTags Gets all the tags that overlap the spans in the specified snapshot of the desired type.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RemoveTagSpan Removes a tag span that was created by calling CreateTagSpan.
Public method RemoveTagSpans Removes all tag spans that match the conditions specified by the predicate.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Update Gets an IDisposable object that represents an update batch.

Top

Events

  Name Description
Public event TagsChanged Occurs when one or more tags have been added or removed.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Text.Tagging Namespace