Condividi tramite


ExpansionProvider.HandlePostExec Method

Called after a command has been executed.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Dichiarazione
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
'Utilizzo
Dim instance As ExpansionProvider
Dim guidCmdGroup As Guid
Dim nCmdId As UInteger
Dim nCmdexecopt As UInteger
Dim commit As Boolean
Dim pvaIn As IntPtr
Dim pvaOut As IntPtr
Dim returnValue As Boolean

returnValue = instance.HandlePostExec(guidCmdGroup, _
    nCmdId, nCmdexecopt, commit, pvaIn, _
    pvaOut)
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: 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

See Also

Reference

ExpansionProvider Class

ExpansionProvider Members

Microsoft.VisualStudio.Package Namespace