LanguageService.GetLanguageID Method (IVsTextBuffer, Int32, Int32, Guid)
Returns the language GUID of the language service.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public virtual int GetLanguageID( IVsTextBuffer buffer, int line, int col, out Guid langId )
[in] The IVsTextBuffer containing the source for which to get the language id.
[in] The line index into the buffer to the source for which to get the language.
[in] The character position in the line.
[out] Returns the GUID of the language for the associated source.
The supplied buffer object holds the entire source file. Some source files support mixed languages, for example JScript and VBScript embedded in an HTML page. This method is called to get the language ID for a particular debugger. If you support multiple languages in a source file, you must derive a class from the LanguageService class and override this method in your class.
The base method always calls LanguageService.GetLanguageServiceGuid which returns the GUID of the language service. This assumes the source file contains only a single language.