IVsLanguageContextProvider::UpdateLanguageContext Method (UInt32, IVsTextLines^, array<TextSpan>^, Object^)
Provides context from the language service to the Visual Studio core editor.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
int UpdateLanguageContext( unsigned int dwHint, IVsTextLines^ pBuffer, array<TextSpan>^ ptsSelection, Object^ pUC )
Parameters
- dwHint
-
Type:
System::UInt32
[in] Value indicating whether this is a typical idle-time update of the context bag or a request for F1 Help. For a list of dwHint values, see LanguageContextHint.
- pBuffer
-
Type:
Microsoft.VisualStudio.TextManager.Interop::IVsTextLines^
[in] Text buffer in question.
- ptsSelection
-
Type:
array<Microsoft.VisualStudio.TextManager.Interop::TextSpan>^
[in] Relevant range of text within the buffer (that is, the context).
- pUC
-
Type:
System::Object^
[in, out] Pointer to the context bag on the Visual Studio core text editor.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From textmgr.idl:
HRESULT IVsLanguageContextProvider::UpdateLanguageContext( DWORD dwHint, IVsTextLines *pBuffer, TextSpan *ptsSelection );
UpdateLanguageContext return values:
S_OK: the implementer has added whatever context should be added.
Any other success code: forbidden (caller will assert).
Any failure code: means the implementer is "passing" on this opportunity to provide context and the text editor will fall back to other mechanisms.