LanguageService.GetColorizer Method (IVsTextLines, IVsColorizer%)
Returns the colorizer associated with a Source object that contains the given IVsTextLines object.
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
'宣言
Public Function GetColorizer ( _
buffer As IVsTextLines, _
<OutAttribute> ByRef result As IVsColorizer _
) As Integer
public int GetColorizer(
IVsTextLines buffer,
out IVsColorizer result
)
Parameters
- buffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] An IVsTextLines object representing the buffer of text to colorize.
- result
Type: Microsoft.VisualStudio.TextManager.Interop.IVsColorizer%
[out] An IVsColorizer object representing the colorizer.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
IVsLanguageInfo.GetColorizer(IVsTextLines, IVsColorizer%)
Remarks
The base method returns the existing Source object that contains the IVsTextLines object or creates a new Source object for the IVsTextLines object, and then asks the Source object for its colorizer. The Colorizer class implements the IVsColorizer interface.
.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.