Partager via


LanguageService.IVsLanguageContextProvider.UpdateLanguageContext Method

Definition

Updates the current user help context given a selected region of the given source.

 virtual int Microsoft.VisualStudio.TextManager.Interop.IVsLanguageContextProvider.UpdateLanguageContext(System::UInt32 dwHint, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ buffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSelection, System::Object ^ ptr) = Microsoft::VisualStudio::TextManager::Interop::IVsLanguageContextProvider::UpdateLanguageContext;
 virtual int Microsoft.VisualStudio.TextManager.Interop.IVsLanguageContextProvider.UpdateLanguageContext(unsigned int dwHint, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ buffer, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSelection, Platform::Object ^ ptr) = Microsoft::VisualStudio::TextManager::Interop::IVsLanguageContextProvider::UpdateLanguageContext;
int Microsoft.VisualStudio.TextManager.Interop.IVsLanguageContextProvider.UpdateLanguageContext(unsigned int dwHint, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & buffer, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsSelection, winrt::Windows::Foundation::IInspectable const & ptr);
int IVsLanguageContextProvider.UpdateLanguageContext (uint dwHint, Microsoft.VisualStudio.TextManager.Interop.IVsTextLines buffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsSelection, object ptr);
abstract member Microsoft.VisualStudio.TextManager.Interop.IVsLanguageContextProvider.UpdateLanguageContext : uint32 * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * obj -> int
override this.Microsoft.VisualStudio.TextManager.Interop.IVsLanguageContextProvider.UpdateLanguageContext : uint32 * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * obj -> int
Function UpdateLanguageContext (dwHint As UInteger, buffer As IVsTextLines, ptsSelection As TextSpan(), ptr As Object) As Integer Implements IVsLanguageContextProvider.UpdateLanguageContext

Parameters

dwHint
UInt32

[in] A set of flags from the LanguageContextHint enumeration.

buffer
IVsTextLines

[in] The IVsTextLines object holding the source.

ptsSelection
TextSpan[]

[in] A single TextSpan object describing the selected range of text (or the current caret position).

ptr
Object

[in] An IVsUserContext object that is to be updated.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Implements

Remarks

The given object can be queried for the IVsUserContext interface by casting it to the IVsUserContext interface: IVsUserContext pContext = ptr as IVsUserContext.

The base method calls the other Microsoft.VisualStudio.Package.LanguageService.UpdateLanguageContext and always returns S_OK.

Applies to