Example #1
0
        public static VsProjectAnalyzer GetAnalyzer(this PythonProjectNode project)
        {
            var analyzer = project.TryGetAnalyzer();

            if (analyzer == null)
            {
                throw new InvalidOperationException("Analyzer is not running");
            }
            return(analyzer);
        }
Example #2
0
 public AnalysisCompleteHandler(PythonLibraryManager owner, PythonProjectNode project)
 {
     Project = project ?? throw new ArgumentNullException(nameof(project));
     _owner  = owner ?? throw new ArgumentNullException(nameof(owner));
     _tasks  = new Dictionary <string, LibraryTask>(StringComparer.OrdinalIgnoreCase);
     Project.ProjectAnalyzerChanging += Project_ProjectAnalyzerChanging;
     _analyzer = Project.TryGetAnalyzer();
     if (_analyzer != null)
     {
         _analyzer.AnalysisComplete += Analyzer_AnalysisComplete;
     }
 }