IVsCommandWindowCompletion.SetCompletionContext Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the current context for statement completion.
public:
int SetCompletionContext(System::String ^ pszFilePath, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsCurStatement, System::Object ^ punkContext);
public:
int SetCompletionContext(Platform::String ^ pszFilePath, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsCurStatement, Platform::Object ^ punkContext);
int SetCompletionContext(std::wstring const & pszFilePath, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & pBuffer, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsCurStatement, winrt::Windows::Foundation::IInspectable const & punkContext);
public int SetCompletionContext (string pszFilePath, Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsCurStatement, object punkContext);
abstract member SetCompletionContext : string * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * obj -> int
Public Function SetCompletionContext (pszFilePath As String, pBuffer As IVsTextLines, ptsCurStatement As TextSpan(), punkContext As Object) As Integer
Parameters
- pszFilePath
- String
[in] The path to the file containing the current statement.
- pBuffer
- IVsTextLines
[in] The text buffer containing the current statement.
- ptsCurStatement
- TextSpan[]
[in] The current statement’s text span.
- punkContext
- Object
[in] may be used to pass additional context in future. If none is available, NULL is passed.
Returns
Returns S_OK if the method succeeds.
Remarks
The debugger calls this method whenever the current statement changes, such as when stepping, changing stack frames, or hitting a breakpoint. The command window listens for this event and calls the appropriate method, such as SetCompletionContext on the current language service.