Exemplo n.º 1
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());
        }
Exemplo n.º 2
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());
        }