Microsoft.VisualStudio.Project.ProjectNode.ExecCommandOnNode C# (CSharp) Method

ExecCommandOnNode() protected method

Handles command execution.
protected ExecCommandOnNode ( Guid cmdGroup, uint cmd, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut ) : int
cmdGroup Guid Unique identifier of the command group
cmd uint The command to be executed.
nCmdexecopt uint Values describe how the object should execute the command.
pvaIn IntPtr Pointer to a VARIANTARG structure containing input arguments. Can be NULL
pvaOut IntPtr VARIANTARG structure to receive command output. Can be NULL.
return int
        protected override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            if (cmdGroup == VsMenus.guidStandardCommandSet97)
            {
                switch ((VsCommands)cmd)
                {

                    case VsCommands.UnloadProject:
                        return this.UnloadProject();
                    case VsCommands.CleanSel:
                    case VsCommands.CleanCtx:
                        return this.CleanProject();
                }
            }
            else if (cmdGroup == VsMenus.guidStandardCommandSet2K)
            {
                switch ((VsCommands2K)cmd)
                {
                    case VsCommands2K.ADDREFERENCE:
                        return this.AddProjectReference();

                    case VsCommands2K.ADDWEBREFERENCE:
                    case VsCommands2K.ADDWEBREFERENCECTX:
                        return this.AddWebReference();

                    case ExploreFolderInWindowsCommand:
                        string explorerPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "explorer.exe");
                        System.Diagnostics.Process.Start(explorerPath, this.ProjectFolder);
                        return VSConstants.S_OK;
                }
            }

            return base.ExecCommandOnNode(cmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut);
        }
ProjectNode