Partager via


IClassifierAggregatorService.GetClassifier Method

Gets the cached IClassifier for the given ITextBuffer.

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

Syntax

'Déclaration
Function GetClassifier ( _
    textBuffer As ITextBuffer _
) As IClassifier
IClassifier GetClassifier(
    ITextBuffer textBuffer
)
IClassifier^ GetClassifier(
    ITextBuffer^ textBuffer
)
abstract GetClassifier : 
        textBuffer:ITextBuffer -> IClassifier 
function GetClassifier(
    textBuffer : ITextBuffer
) : IClassifier

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Classification.IClassifier
The cached IClassifier.

Exceptions

Exception Condition
ArgumentNullException

textBuffer is nulla null reference (Nothing in Visual Basic).

Remarks

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

.NET Framework Security

See Also

Reference

IClassifierAggregatorService Interface

Microsoft.VisualStudio.Text.Classification Namespace