protected override IScopeAnalyzer GetScopeAnalyzer() { var selectedCSharpProjects = VisualStudioIde .GetSelectedVisualStudioProjects() .Where(project => project.IsCSharpProject()); var projects = Workspace.GetRoslynProjectsFromVisualStudioProjects(selectedCSharpProjects); return(new MultipleProjectsScopeAnalyzer(true, projects.ToArray())); }
protected override void IsCommandVisibleAndEnabled(out bool isVisible, out bool isEnabled) { var selectedProjects = VisualStudioIde.GetSelectedVisualStudioProjects(); isVisible = isEnabled = selectedProjects.Any(project => project.IsCSharpProject()); }