Sdílet prostřednictvím


IVsImmediateStatementCompletion2.SetCompletionContext Method

Definition

Sets the current context for statement completion for the command window.

public:
 int SetCompletionContext(System::String ^ pszFilePath, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsCurStatement, System::Object ^ punkContext, Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pTextView);
public:
 int SetCompletionContext(Platform::String ^ pszFilePath, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsCurStatement, Platform::Object ^ punkContext, Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pTextView);
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, Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & pTextView);
public int SetCompletionContext (string pszFilePath, Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsCurStatement, object punkContext, Microsoft.VisualStudio.TextManager.Interop.IVsTextView pTextView);
abstract member SetCompletionContext : string * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * obj * Microsoft.VisualStudio.TextManager.Interop.IVsTextView -> int
Public Function SetCompletionContext (pszFilePath As String, pBuffer As IVsTextLines, ptsCurStatement As TextSpan(), punkContext As Object, pTextView As IVsTextView) 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.

pTextView
IVsTextView

[in] The text view.

Returns

Returns S_OK if the method succeeds.

Remarks

The command window calls this method to forward the information that the debugger passes via SetCompletionContext.

Applies to