CodeDocumentTaggerProvider<TTagger> Class
Provides an ICodeDocumentTaggerProvider capable of creating ITagger<T> objects which have a constructor that accepts a single ICodeDocument instance parameter.
public class CodeDocumentTaggerProvider<TTagger> : TaggerProviderBase<TTagger>, ICodeDocumentTaggerProvider where TTagger : class
- Type Parameters:
-
TTagger
-The Type of ITagger<T> that this provider creates. The tagger type must have a constructor that accepts a single ICodeDocument instance parameter.
- Inheritance:
- Object TaggerProviderBase<TTagger> Object
- Derived:
- TokenTaggerProvider<TTagger>
- Implements:
- ICodeDocumentTaggerProvider
Constructors
CodeDocumentTaggerProvider()
Initializes a new instance of the CodeDocumentTaggerProvider
class.
public CodeDocumentTaggerProvider()
CodeDocumentTaggerProvider(Object)
Initializes a new instance of the CodeDocumentTaggerProvider
class.
public CodeDocumentTaggerProvider(object singletonKey)
Parameter | Type | Description |
---|---|---|
singletonKey | Object | When a non-null value is passed, the tagger will be stored as a singleton under the specified key in the document's properties. |
Methods
GetTagger<T>(ICodeDocument)
Returns an ITagger<T> for the specified ICodeDocument.
public ITagger<T> GetTagger<T>(ICodeDocument document)
where T : ITag
- Type Parameters:
-
T
-The type of ITag created by the tagger.
Parameter | Type | Description |
---|---|---|
document | ICodeDocument | The ICodeDocument that requires an ITagger<T>. |
Returns
- ITagger<T>:
An ITagger<T> for the specified ICodeDocument.