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());
        }
Beispiel #2
0
            public ParseTask(ParseQueue queue, IDocument document, PythonLanguageVersion languageVersion)
            {
                _queue           = queue;
                _document        = document;
                _languageVersion = languageVersion;

                _queue._parsingInProgress.Increment();
                _parse = (_document as IPythonProjectEntry)?.BeginParse();

                _tcs = new TaskCompletionSource <IAnalysisCookie>();
            }
        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());
        }