private static void InitializeFullSolutionAnalysisState(Workspace workspace, IErrorList2 errorList2)
        {
            // Initialize the error list toggle state based on full solution analysis state for all supported languages.
            var fullAnalysisState = workspace.Options.GetOption(RuntimeOptions.FullSolutionAnalysis) &&
                                    ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, LanguageNames.CSharp) &&
                                    ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, LanguageNames.VisualBasic) &&
                                    ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, TypeScriptLanguageName);

            errorList2.AnalysisToggleState = fullAnalysisState;
        }
        private static void SetFullSolutionAnalysisState(Workspace workspace, IErrorList2 errorList2)
        {
            // Set error list toggle state based on current analysis state for all languages for projects in current solution.
            var fullAnalysisState = workspace.Options.GetOption(RuntimeOptions.FullSolutionAnalysis);

            if (fullAnalysisState)
            {
                var languages = workspace.CurrentSolution.Projects.Select(p => p.Language).Distinct();
                foreach (var language in languages)
                {
                    if (!ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace, language))
                    {
                        fullAnalysisState = false;
                        break;
                    }
                }
            }

            errorList2.AnalysisToggleState = fullAnalysisState;
        }
 private static void InitializeFullSolutionAnalysisState(Workspace workspace, IErrorList2 errorList2)
 {
     // Initialize the error list toggle state based on full solution analysis state for all supported languages.
     var fullAnalysisState = workspace.Options.GetOption(RuntimeOptions.FullSolutionAnalysis) && 
         ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, LanguageNames.CSharp) &&
         ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, LanguageNames.VisualBasic) &&
         ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace.Options, TypeScriptLanguageName);
     errorList2.AnalysisToggleState = fullAnalysisState;
 }