private bool IsSolutionExistsAndNotDebuggingAndNotBuilding() { int pfActive; int result = VsMonitorSelection.IsCmdUIContextActive(_solutionNotBuildingAndNotDebuggingContextCookie, out pfActive); return(result == VSConstants.S_OK && pfActive > 0); }
private bool ShouldMEFBeInitialized() { ThreadHelper.ThrowIfNotOnUIThread(); if (!_initialized) { var hr = VsMonitorSelection.IsCmdUIContextActive( _solutionExistsCookie, out var pfActive); return(ErrorHandler.Succeeded(hr) && pfActive > 0); } return(false); }
private bool IsSolutionExistsAndNotDebuggingAndNotBuilding() { ThreadHelper.ThrowIfNotOnUIThread(); var hr = VsMonitorSelection.IsCmdUIContextActive( _solutionExistsAndFullyLoadedContextCookie, out var pfActive); if (ErrorHandler.Succeeded(hr) && pfActive > 0) { hr = VsMonitorSelection.IsCmdUIContextActive( _solutionNotBuildingAndNotDebuggingContextCookie, out pfActive); return(ErrorHandler.Succeeded(hr) && pfActive > 0); } return(false); }
private bool IsIDEInDebuggingOrBuildingContext() { int pfActive; int result = VsMonitorSelection.IsCmdUIContextActive(_debuggingContextCookie, out pfActive); if (result == VSConstants.S_OK && pfActive > 0) { return(true); } result = VsMonitorSelection.IsCmdUIContextActive(_solutionBuildingContextCookie, out pfActive); if (result == VSConstants.S_OK && pfActive > 0) { return(true); } return(false); }