IClassifierAggregatorService.GetClassifier(ITextBuffer) Method

Definition

Gets the cached IClassifier for the given ITextBuffer.
If one does not exist, an IClassifier will be created and cached with the given ITextBuffer.

public:
 Microsoft::VisualStudio::Text::Classification::IClassifier ^ GetClassifier(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer);
public:
 Microsoft::VisualStudio::Text::Classification::IClassifier ^ GetClassifier(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer);
Microsoft::VisualStudio::Text::Classification::IClassifier GetClassifier(Microsoft::VisualStudio::Text::ITextBuffer const & textBuffer);
public Microsoft.VisualStudio.Text.Classification.IClassifier GetClassifier (Microsoft.VisualStudio.Text.ITextBuffer textBuffer);
abstract member GetClassifier : Microsoft.VisualStudio.Text.ITextBuffer -> Microsoft.VisualStudio.Text.Classification.IClassifier
Public Function GetClassifier (textBuffer As ITextBuffer) As IClassifier

Parameters

textBuffer
ITextBuffer

The ITextBuffer with which to retrieve/create the IClassifier.

Returns

The cached IClassifier.

Exceptions

textBuffer is null.

Remarks

If there is no existing classifier, an IClassifier will be created and cached with the given ITextBuffer.

Applies to