Partager via


ExpansionProvider.HandlePostExec Method

Called after a command has been executed.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.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.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.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
)
public:
virtual bool HandlePostExec(
    Guid% guidCmdGroup, 
    unsigned int nCmdId, 
    unsigned int nCmdexecopt, 
    bool commit, 
    IntPtr pvaIn, 
    IntPtr pvaOut
)
abstract HandlePostExec : 
        guidCmdGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdexecopt:uint32 * 
        commit:bool * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> bool  
override HandlePostExec : 
        guidCmdGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdexecopt:uint32 * 
        commit:bool * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> bool
public function HandlePostExec(
    guidCmdGroup : Guid, 
    nCmdId : uint, 
    nCmdexecopt : uint, 
    commit : boolean, 
    pvaIn : IntPtr, 
    pvaOut : IntPtr
) : boolean

Parameters

  • guidCmdGroup
    Type: Guid%

    [in] The GUID of the command group.

  • nCmdId
    Type: UInt32

    [in] The specific ID of the command from the command group. This identifies the command to execute.

  • nCmdexecopt
    Type: UInt32

    [in] Additional parameters for the command (packed into a 32-bit value).

  • commit
    Type: Boolean

    [in] This is true if the code snippet has been committed to the source file.

  • pvaIn
    Type: 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: IntPtr

    [in, out] An unmarshaled pointer to a Variant to hold the result of the command, if any.

Return Value

Type: 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

See Also

Reference

ExpansionProvider Class

Microsoft.VisualStudio.Package Namespace