LanguageService.GetColorizer Method (IVsTextLines)
Iinstantiates a Colorizer class.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaração
Public Overridable Function GetColorizer ( _
buffer As IVsTextLines _
) As Colorizer
public virtual Colorizer GetColorizer(
IVsTextLines buffer
)
Parameters
- buffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] An IVsTextLines object representing the buffer of text to colorize.
Return Value
Type: Microsoft.VisualStudio.Package.Colorizer
If successful, returns a Colorizer object; otherwise, returns a null value.
Remarks
This method returns a new instance of a Colorizer object. If you need to supply functionality beyond what the base Colorizer class offers, then you must derive a class from the Colorizer class and return an instance of your class. This is typically not necessary as the existing Colorizer class handles all colorizing tasks using the IScanner object supplied by GetScanner.
The base method always returns a new Colorizer object that is initialized with an IScanner object obtained from GetScanner. This method is called whenever a new Source object is created.
.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.