ExpansionProvider.HandlePostExec Method
Called after a command has been executed.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'Declaration
Public Overridable Function HandlePostExec ( _
ByRef guidCmdGroup As Guid, _
nCmdId As UInteger, _
nCmdexecopt As UInteger, _
commit As Boolean, _
pvaIn As IntPtr, _
pvaOut As IntPtr _
) As Boolean
public virtual bool HandlePostExec(
ref Guid guidCmdGroup,
uint nCmdId,
uint nCmdexecopt,
bool commit,
IntPtr pvaIn,
IntPtr pvaOut
)
Parameters
- guidCmdGroup
Type: System.Guid%
[in] The GUID of the command group.
- nCmdId
Type: System.UInt32
[in] The specific ID of the command from the command group. This identifies the command to execute.
- nCmdexecopt
Type: System.UInt32
[in] Additional parameters for the command (packed into a 32-bit value).
- commit
Type: System.Boolean
[in] This is true if the code snippet has been committed to the source file.
- pvaIn
Type: System.IntPtr
[in] An unmarshaled pointer to a Variant holding any parameters required by the command. This can be a null value indicating there are no additional parameters.
- pvaOut
Type: System.IntPtr
[in, out] An unmarshaled pointer to a Variant to hold the result of the command, if any.
Return Value
Type: System.Boolean
If the command was handled, returns true; otherwise, returns false to let the caller handle the command.
Remarks
This method is called after a command is executed. This allows the expansion provider a chance to finish any snippet expansion details.
The base method handles only the RETURN command and then only if an expansion was started in the HandlePreExec method; in this case, the EndTemplateEditing method is called to end the editing session — but only if the commit parameter is true — and true is returned to indicate the RETURN command was handled (this prevents formatting of the span which could mess up the format specified by the snippet itself).
.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.