public bool QueryStatus(List <WorkspaceVisualNodeBase> selection, Guid pguidCmdGroup, uint nCmdID, ref uint cmdf, ref string customTitle)
        {
            bool handled = false;

            if (pguidCmdGroup == CommandGroup.NuGetOnlineEnvironmentsClientProjectCommandSetGuid)
            {
                var nCmdIDInt = (int)nCmdID;
                {
                    switch (nCmdIDInt)
                    {
                    case PkgCmdIDList.CmdidRestorePackages:
                        if (IsSolutionOnlySelection(selection))
                        {
                            var isRestoreActionInProgress = _restoreCommandHandler.IsRestoreActionInProgress();
                            cmdf = (uint)((isRestoreActionInProgress ? 0 : OLECMDF.OLECMDF_ENABLED)
                                          | OLECMDF.OLECMDF_SUPPORTED);
                            handled = true;
                        }
                        break;

                    case PkgCmdIDList.CmdIdManageProjectUI:
                        if (IsSupportedProjectSelection(selection))
                        {
                            var isPackageManagerUISupported = _packageManagerUICommandHandler.IsPackageManagerUISupported(selection.Single());
                            cmdf = (uint)(isPackageManagerUISupported ?
                                          (OLECMDF.OLECMDF_ENABLED | OLECMDF.OLECMDF_SUPPORTED) :
                                          OLECMDF.OLECMDF_INVISIBLE);
                            handled = true;
                        }
                        break;

                    default:
                        break;
                    }
                }
            }
            return(handled);
        }
        public bool QueryStatus(List <WorkspaceVisualNodeBase> selection, Guid pguidCmdGroup, uint nCmdID, ref uint cmdf, ref string customTitle)
        {
            bool handled = false;

            if (pguidCmdGroup == CommandGroup.NuGetOnlineEnvironmentsClientProjectCommandSetGuid)
            {
                var nCmdIDInt = (int)nCmdID;

                if (IsSolutionOnlySelection(selection))
                {
                    switch (nCmdIDInt)
                    {
                    case PkgCmdIDList.CmdidRestorePackages:
                        var isRestoreActionInProgress = _restoreCommandHandler.IsRestoreActionInProgress();
                        cmdf = (uint)((isRestoreActionInProgress ? 0 : Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_ENABLED)
                                      | Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_SUPPORTED);
                        handled = true;
                        break;
                    }
                }
            }

            return(handled);
        }