Partilhar via


IViewClassifierAggregatorService.GetClassifier(ITextView) Method

Definition

Gets the cached IClassifier for the given ITextView. If one does not exist, an IClassifier will be created and cached for each ITextBuffer in the view's buffer graph.

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

Parameters

textView
ITextView

The ITextView to use in retrieving or creating the IClassifier.

Returns

The cached IClassifier.

Exceptions

textView is null.

Remarks

If no classifier exists, an IClassifier is created and cached for each ITextBuffer in the view's buffer graph.

Applies to