コード例 #1
0
        protected override IScopeAnalyzer GetScopeAnalyzer()
        {
            var selectedCSharpProjects = VisualStudioIde
                                         .GetSelectedVisualStudioProjects()
                                         .Where(project => project.IsCSharpProject());

            var projects = Workspace.GetRoslynProjectsFromVisualStudioProjects(selectedCSharpProjects);

            return(new MultipleProjectsScopeAnalyzer(true, projects.ToArray()));
        }
コード例 #2
0
        protected override void IsCommandVisibleAndEnabled(out bool isVisible, out bool isEnabled)
        {
            var selectedProjects = VisualStudioIde.GetSelectedVisualStudioProjects();

            isVisible = isEnabled = selectedProjects.Any(project => project.IsCSharpProject());
        }