コード例 #1
0
 /// <summary>
 /// Getting not analyzed enterprise group filtered by user query
 /// </summary>
 /// <param name="analysisQueue">Analysis queue item</param>
 /// <returns>Enterprise group</returns>
 public EnterpriseGroup GetEnterpriseGroupForAnalysis(AnalysisQueue analysisQueue)
 {
     return(_ctx.EnterpriseGroups.Include(x => x.PersonsUnits).Include(x => x.Address).FirstOrDefault(su =>
                                                                                                      !_ctx.AnalysisLogs.Any(al =>
                                                                                                                             al.AnalysisQueueId == analysisQueue.Id && al.AnalyzedUnitId == su.RegId) &&
                                                                                                      su.StartPeriod >= analysisQueue.UserStartPeriod && su.StartPeriod <= analysisQueue.UserEndPeriod));
 }
コード例 #2
0
        private async Task DoInitializeAsync(InitializeParams @params, CancellationToken token)
        {
            _disposableBag.ThrowIfDisposed();
            Analyzer = await AnalysisQueue.ExecuteInQueueAsync(ct => CreateAnalyzer(@params.initializationOptions.interpreter, token), AnalysisPriority.High);

            _disposableBag.ThrowIfDisposed();
            _clientCaps      = @params.capabilities;
            _traceLogging    = @params.initializationOptions.traceLogging;
            _analysisUpdates = @params.initializationOptions.analysisUpdates;

            Analyzer.EnableDiagnostics = _clientCaps?.python?.liveLinting ?? false;
            _reloadModulesQueueItem    = new ReloadModulesQueueItem(Analyzer);

            if (@params.initializationOptions.displayOptions != null)
            {
                DisplayOptions = @params.initializationOptions.displayOptions;
            }
            _displayTextBuilder = DocumentationBuilder.Create(DisplayOptions);

            DisplayStartupInfo();

            if (@params.rootUri != null)
            {
                _rootDir = @params.rootUri.ToAbsolutePath();
            }
            else if (!string.IsNullOrEmpty(@params.rootPath))
            {
                _rootDir = PathUtils.NormalizePath(@params.rootPath);
            }

            SetSearchPaths(@params.initializationOptions.searchPaths);
            SetTypeStubSearchPaths(@params.initializationOptions.typeStubSearchPaths);

            Analyzer.Interpreter.ModuleNamesChanged += Interpreter_ModuleNamesChanged;
        }
コード例 #3
0
        public Server()
        {
            AnalysisQueue = new AnalysisQueue();
            AnalysisQueue.UnhandledException += Analysis_UnhandledException;

            ParseQueue   = new ParseQueue();
            _editorFiles = new EditorFiles(this);

            _disposableBag
            .Add(() => {
                foreach (var ext in _extensions.Values)
                {
                    ext?.Dispose();
                }
                foreach (var ext in _oldExtensions.Values)
                {
                    (ext as IDisposable)?.Dispose();
                }
            })
            .Add(ProjectFiles)
            .Add(() => Analyzer?.Dispose())
            .Add(AnalysisQueue)
            .Add(_editorFiles)
            .Add(() => _shutdownCts.Cancel());
        }
コード例 #4
0
 /// <summary>
 /// Getting not analyzed statistical unit filtered by user query
 /// </summary>
 /// <param name="analysisQueue">Analysis queue item</param>
 /// <returns>Statistical unit</returns>
 public StatisticalUnit GetStatisticalUnitForAnalysis(AnalysisQueue analysisQueue)
 {
     return(_ctx.StatisticalUnits.Include(x => x.PersonsUnits).Include(x => x.Address).FirstOrDefault(su =>
                                                                                                      !_ctx.AnalysisLogs.Any(al =>
                                                                                                                             al.AnalysisQueueId == analysisQueue.Id && al.AnalyzedUnitId == su.RegId) &&
                                                                                                      su.StartPeriod >= analysisQueue.UserStartPeriod && su.StartPeriod <= analysisQueue.UserEndPeriod));
 }
コード例 #5
0
 private void Interpreter_ModuleNamesChanged(object sender, EventArgs e)
 {
     Analyzer.Modules.Reload();
     foreach (var entry in Analyzer.ModulesByFilename)
     {
         AnalysisQueue.Enqueue(entry.Value.ProjectEntry, AnalysisPriority.Normal);
     }
 }
コード例 #6
0
        public RubyAnalyzer(IComponentModel /*!*/ componentModel)
        {
            _engine           = componentModel.GetService <IRubyRuntimeHost>().RubyScriptEngine;
            _squiggleProvider = componentModel.GetService <IErrorProviderFactory>();
            _queue            = new ParseQueue(this);

            _analysisQueue = new AnalysisQueue <AnalysisItem>(this);
            _projectFiles  = new Dictionary <string, AnalysisItem>(StringComparer.OrdinalIgnoreCase);
        }
コード例 #7
0
 public Server()
 {
     _queue = new AnalysisQueue();
     _queue.UnhandledException += Analysis_UnhandledException;
     _pendingAnalysisEnqueue    = new VolatileCounter();
     _parseQueue   = new ParseQueue();
     _pendingParse = new Dictionary <IDocument, VolatileCounter>();
     _openFiles    = new OpenFiles(_projectFiles, this);
 }
コード例 #8
0
        public async Task ReloadModulesAsync(CancellationToken token)
        {
#if false
            foreach (var entry in Analyzer.ModulesByFilename)
            {
                AnalysisQueue.Enqueue(entry.Value.ProjectEntry, AnalysisPriority.Normal);
            }
#endif
        }
コード例 #9
0
        public PythonAnalyzer(IPythonRuntimeHost runtimeHost, IErrorProviderFactory errorProvider)
        {
            _engine           = runtimeHost.ScriptEngine;
            _squiggleProvider = errorProvider;

            _queue         = new ParseQueue(this);
            _analysisQueue = new AnalysisQueue <IProjectEntry>(this);
            _analysisState = new ProjectState(_engine);
            _projectFiles  = new Dictionary <string, IProjectEntry>(StringComparer.OrdinalIgnoreCase);
        }
コード例 #10
0
 public Server()
 {
     _queue = new AnalysisQueue();
     _pendingAnalysisEnqueue  = new VolatileCounter();
     _parseQueue              = new ParseQueue();
     _pendingParse            = new Dictionary <IDocument, VolatileCounter>();
     _projectFiles            = new ConcurrentDictionary <Uri, IProjectEntry>();
     _pendingChanges          = new ConcurrentDictionary <Uri, List <DidChangeTextDocumentParams> >(UriEqualityComparer.IncludeFragment);
     _lastReportedDiagnostics = new ConcurrentDictionary <Uri, Dictionary <int, int> >();
 }
コード例 #11
0
ファイル: Server.cs プロジェクト: mstahl00/PTVS
 public Server()
 {
     _queue = new AnalysisQueue();
     _queue.UnhandledException += Analysis_UnhandledException;
     _pendingAnalysisEnqueue    = new VolatileCounter();
     _parseQueue   = new ParseQueue();
     _pendingParse = new Dictionary <IDocument, VolatileCounter>();
     _openFiles    = new OpenFiles(_projectFiles, this);
     _extensions   = new ConcurrentDictionary <string, ILanguageServerExtension>();
 }
コード例 #12
0
 public SentinelModule(string name, bool importing) : base(name)
 {
     _scope = AnalysisQueue.Current;
     if (importing)
     {
         _semaphore = new SemaphoreSlim(0, 1000);
     }
     else
     {
         _realModule = this;
     }
 }
コード例 #13
0
 /// <summary>
 /// Statistical units analysis
 /// </summary>
 /// <param name="analysisQueue">Queue item</param>
 /// <param name="analyzer">Stat unit analyzer</param>
 private void AnalyzeStatisticalUnits(AnalysisQueue analysisQueue, IStatUnitAnalyzer analyzer)
 {
     while (true)
     {
         var unitForAnalysis = _helper.GetStatisticalUnitForAnalysis(analysisQueue);
         if (unitForAnalysis == null)
         {
             break;
         }
         AddAnalysisLogs(analysisQueue.Id, unitForAnalysis, analyzer);
     }
 }
コード例 #14
0
 /// <summary>
 /// Enterprise groups analysis
 /// </summary>
 /// <param name="analysisQueue">Queue item</param>
 /// <param name="analyzer">Stat unit analyzer</param>
 private void AnalyzeEnterpriseGroups(AnalysisQueue analysisQueue, IStatUnitAnalyzer analyzer)
 {
     while (true)
     {
         var unitForAnalysis = _helper.GetEnterpriseGroupForAnalysis(analysisQueue);
         if (unitForAnalysis == null)
         {
             break;
         }
         AddAnalysisLogs(analysisQueue.Id, unitForAnalysis, analyzer);
     }
 }
コード例 #15
0
        public static void AddAnalysisLogs(NSCRegDbContext context)
        {
            var queueEntry = new AnalysisQueue
            {
                UserStartPeriod   = DateTime.Now,
                UserEndPeriod     = DateTime.Now,
                ServerStartPeriod = DateTime.Now,
                User = context.Users.First(),
            };

            var log = new[]
            {
                new AnalysisLog {
                    AnalyzedUnitId = 1, AnalyzedUnitType = StatUnitTypes.LocalUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:25.7736777"), ResolvedAt = null, ErrorValues = "{'LegalUnitId':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 2, AnalyzedUnitType = StatUnitTypes.LocalUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:28.4686079"), ResolvedAt = null, ErrorValues = "{'LegalUnitId':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 3, AnalyzedUnitType = StatUnitTypes.LegalUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:30.3878882"), ResolvedAt = null, ErrorValues = "{'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'Persons':['AnalysisMandatoryPersonOwner']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 4, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings;OrphanUnitsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:32.1186972"), ResolvedAt = null, ErrorValues = "{'LegalUnits':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'EntGroupId':['AnalysisOrphanEnterprise']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 5, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings;OrphanUnitsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:33.8364446"), ResolvedAt = null, ErrorValues = "{'LegalUnits':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'EntGroupId':['AnalysisOrphanEnterprise']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 6, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings;OrphanUnitsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:35.5120566"), ResolvedAt = null, ErrorValues = "{'LegalUnits':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'EntGroupId':['AnalysisOrphanEnterprise']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 7, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings;OrphanUnitsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:37.2072083"), ResolvedAt = null, ErrorValues = "{'LegalUnits':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'EntGroupId':['AnalysisOrphanEnterprise']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 8, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings;OrphanUnitsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:39.0724324"), ResolvedAt = null, ErrorValues = "{'LegalUnits':['AnalysisRelatedLegalUnit'],'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'EntGroupId':['AnalysisOrphanEnterprise']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 9, AnalyzedUnitType = StatUnitTypes.EnterpriseUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:40.7310654"), ResolvedAt = null, ErrorValues = "{'Activities':['AnalysisRelatedActivity'],'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive']}"
                },
                new AnalysisLog {
                    AnalyzedUnitId = 10, AnalyzedUnitType = StatUnitTypes.LegalUnit, SummaryMessages = "ConnectionRulesWarnings;MandatoryFieldsRulesWarnings", IssuedAt = DateTime.Parse("2017-12-22 19:09:42.3663417"), ResolvedAt = null, ErrorValues = "{'Address':['AnalysisRelatedAddress'],'DataSourceClassificationId':['AnalysisMandatoryDataSource'],'ShortName':['AnalysisMandatoryShortName'],'TelephoneNo':['AnalysisMandatoryTelephoneNo'],'RegistrationReasonId':['AnalysisMandatoryRegistrationReason'],'ContactPerson':['AnalysisMandatoryContactPerson'],'Status':['AnalysisMandatoryStatusActive'],'Persons':['AnalysisMandatoryPersonOwner']}"
                },
            };

            foreach (var entry in log)
            {
                entry.AnalysisQueue = queueEntry;
            }

            context.AnalysisLogs.AddRange(log);
            context.SaveChanges();
        }
コード例 #16
0
        public void AnalyzeStatUnits(AnalysisQueue analysisQueue)
        {
            if (!analysisQueue.ServerStartPeriod.HasValue)
            {
                analysisQueue.ServerStartPeriod = DateTime.Now;
                _context.SaveChanges();
            }
            var analyzer = new StatUnitAnalyzer(_analysisRules, _mandatoryFields, _context, _validationSettings);

            AnalyzeStatisticalUnits(analysisQueue, analyzer);
            AnalyzeEnterpriseGroups(analysisQueue, analyzer);

            analysisQueue.ServerEndPeriod = DateTime.Now;
            _context.SaveChanges();
        }
コード例 #17
0
        public async Task ReloadModulesAsync(CancellationToken token)
        {
            LogMessage(MessageType._General, "Reloading modules...");

            // Make sure reload modules is executed on the analyzer thread.
            var task = _reloadModulesQueueItem.Task;

            AnalysisQueue.Enqueue(_reloadModulesQueueItem, AnalysisPriority.Normal);
            await task;

            // re-analyze all of the modules when we get a new set of modules loaded...
            foreach (var entry in Analyzer.ModulesByFilename)
            {
                AnalysisQueue.Enqueue(entry.Value.ProjectEntry, AnalysisPriority.Normal);
            }
        }
コード例 #18
0
        public Server(IServiceContainer services = null) : base(services)
        {
            AnalysisQueue = new AnalysisQueue();
            AnalysisQueue.UnhandledException += Analysis_UnhandledException;

            ParseQueue   = new ParseQueue();
            _editorFiles = new EditorFiles(this);

            _disposableBag
            .Add(() => {
                foreach (var ext in _extensions.Values)
                {
                    ext.Dispose();
                }
            })
            .Add(ProjectFiles)
            .Add(() => Analyzer?.Dispose())
            .Add(AnalysisQueue)
            .Add(_editorFiles)
            .Add(() => _shutdownCts.Cancel());
        }
コード例 #19
0
        // ./Analysis/Engine/Impl/Infrastructure/Extensions/EnumerableExtensions.cs:26 -- think this is where MaybeEnumerate is defined

        private async Task DoInitializeAsync(/* InitializeParams @params, CancellationToken ct */)
        {
            // _disposableBag.ThrowIfDisposed();
            Analyzer = await AnalysisQueue.ExecuteInQueueAsync(ct => CreateAnalyzer(), AnalysisPriority.High);
        }
コード例 #20
0
 private void CreateNewAnalyzer(AnalysisLimits limits) {
     _jsAnalyzer = new JsAnalyzer(limits);
     if (ShouldEnqueue()) {
         _analysisQueue = new AnalysisQueue(this);
     }
     _fullyLoaded = true;
 }
コード例 #21
0
 private void CreateNewAnalyzer(AnalysisLimits limits) {
     _jsAnalyzer = new JsAnalyzer(limits);
     if (_analysisLevel != AnalysisLevel.None) {
         _analysisQueue = new AnalysisQueue(this);
     }
     _fullyLoaded = true;
 }
コード例 #22
0
ファイル: AnalysisQueue.cs プロジェクト: Weflac/nodejstools
 public GroupAnalysis(IGroupableAnalysisProject project, AnalysisQueue queue)
 {
     _project = project;
     _queue   = queue;
 }
コード例 #23
0
 private void CreateNewAnalyzer(AnalysisLimits limits) {
     if (_analysisLevel == AnalysisLevel.NodeLsNone || _analysisLevel == AnalysisLevel.Preview) {
         return;
     }
     _jsAnalyzer = new JsAnalyzer(limits);
     if (ShouldEnqueue()) {
         _analysisQueue = new AnalysisQueue(this);
     }
     _fullyLoaded = true;
 }
コード例 #24
0
 public GroupAnalysis(IGroupableAnalysisProject project, AnalysisQueue queue) {
     _project = project;
     _queue = queue;
 }
コード例 #25
0
        private bool LoadCachedAnalysis(AnalysisLimits limits) {
            if (_analysisLevel == AnalysisLevel.NodeLsNone || _analysisLevel == AnalysisLevel.Preview) {
                return false;
            }

            string analysisDb = GetAnalysisPath();
            if (File.Exists(analysisDb) && ShouldEnqueue()) {
                FileStream stream = null;
                bool disposeStream = true;
                try {
                    stream = new FileStream(analysisDb, FileMode.Open);
                    byte[] header = new byte[DbHeader.Length];
                    stream.Read(header, 0, header.Length);
                    if (DbHeader.SequenceEqual(header)) {
                        var statusbar = (IVsStatusbar)NodejsPackage.GetGlobalService(typeof(SVsStatusbar));
                        if (statusbar != null) {
                            statusbar.SetText(SR.GetString(SR.StatusAnalysisLoading));
                        }

                        Task.Run(() => {
                            try {
                                using (new DebugTimer("LoadAnalysis")) {
                                    var serializer = new AnalysisSerializer();
                                    var analyzer = (JsAnalyzer)serializer.Deserialize(stream);
                                    AnalysisQueue queue;
                                    if (analyzer.Limits.Equals(limits)) {
                                        queue = new AnalysisQueue(this);
                                        foreach (var entry in analyzer.AllModules) {
                                            _projectFiles[entry.FilePath] = new ProjectItem(entry);
                                        }
                                        _reparseDateTime = new FileInfo(analysisDb).LastWriteTime;

                                        _analysisQueue = queue;
                                        _jsAnalyzer = analyzer;

                                        if (statusbar != null) {
                                            statusbar.SetText(SR.GetString(SR.StatusAnalysisLoaded));
                                        }
                                    }
                                }
                            } catch (InvalidOperationException) {
                                // corrupt or invalid DB
                                if (statusbar != null) {
                                    statusbar.SetText(SR.GetString(SR.StatusAnalysisLoadFailed));
                                }
                            } catch (Exception e) {
                                Debug.Fail(String.Format("Unexpected exception while loading analysis: {0}", e));
                                // bug in deserialization
                                if (statusbar != null) {
                                    statusbar.SetText(SR.GetString(SR.StatusAnalysisLoadFailed));
                                }
                            } finally {
                                stream.Dispose();

                                // apply any changes 
                                lock (_loadingDeltas) {
                                    if (_jsAnalyzer == null) {
                                        // we failed to load the cached analysis, create a new
                                        // analyzer now...
                                        CreateNewAnalyzer(LoadLimits());
                                    }

                                    _fullyLoaded = true;
                                    foreach (var delta in _loadingDeltas) {
                                        delta();
                                    }
                                }
                            }
                        }).HandleAllExceptions(SR.GetString(SR.NodejsToolsForVisualStudio)).DoNotWait();
                        disposeStream = false;
                        return true;
                    }
                } catch (IOException) {
                } finally {
                    if (stream != null && disposeStream) {
                        stream.Dispose();
                    }
                }
            }
            return false;
        }