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
'Declaration
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
textBuffer
Type: Microsoft.VisualStudio.Text.ITextBufferThe ITextBuffer with which to retrieve/create the IClassifier.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.