IVsCommandWindowCompletion.SetCompletionContext Method
Sets the current context for statement completion.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'宣告
Function SetCompletionContext ( _
pszFilePath As String, _
pBuffer As IVsTextLines, _
ptsCurStatement As TextSpan(), _
punkContext As Object _
) As Integer
int SetCompletionContext(
string pszFilePath,
IVsTextLines pBuffer,
TextSpan[] ptsCurStatement,
Object punkContext
)
int SetCompletionContext(
[InAttribute] String^ pszFilePath,
[InAttribute] IVsTextLines^ pBuffer,
[InAttribute] array<TextSpan>^ ptsCurStatement,
[InAttribute] Object^ punkContext
)
abstract SetCompletionContext :
pszFilePath:string *
pBuffer:IVsTextLines *
ptsCurStatement:TextSpan[] *
punkContext:Object -> int
function SetCompletionContext(
pszFilePath : String,
pBuffer : IVsTextLines,
ptsCurStatement : TextSpan[],
punkContext : Object
) : int
Parameters
- pszFilePath
Type: System.String
[in] The path to the file containing the current statement.
- pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] The text buffer containing the current statement.
- ptsCurStatement
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] The current statement’s text span.
- punkContext
Type: System.Object
[in] may be used to pass additional context in future. If none is available, NULL is passed.
Return Value
Type: System.Int32
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.