Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            _packageInstallerService?.Disconnect(this.RoslynLanguageName);
            _symbolSearchService?.Disconnect(this.RoslynLanguageName);

            if (_miscellaneousFilesWorkspace != null)
            {
                _miscellaneousFilesWorkspace.StopSolutionCrawler();
            }

            if (this.Workspace != null)
            {
                this.Workspace.StopSolutionCrawler();
                this.Workspace.Services.GetService <IRemoteHostClientService>()?.Disable();
            }

            // If we've created the language service then tell it it's time to clean itself up now.
            if (_languageService != null)
            {
                _languageService.TearDown();
                _languageService = null;
            }

            base.Dispose(disposing);
        }
Exemple #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_miscellaneousFilesWorkspace != null)
                {
                    _miscellaneousFilesWorkspace.StopSolutionCrawler();
                }

                if (ThreadHelper.JoinableTaskFactory.Run(() => IsInIdeModeAsync(this.Workspace, CancellationToken.None)))
                {
                    this.Workspace.StopSolutionCrawler();

                    DisableRemoteHostClientService();
                }

                // If we've created the language service then tell it it's time to clean itself up now.
                if (_languageService != null)
                {
                    _languageService.TearDown();
                    _languageService = null;
                }
            }

            base.Dispose(disposing);
        }
Exemple #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_miscellaneousFilesWorkspace != null)
                {
                    _miscellaneousFilesWorkspace.StopSolutionCrawler();
                }

                ThreadHelper.JoinableTaskFactory.Run(async() =>
                {
                    if (await IsInIdeModeAsync(this.Workspace, CancellationToken.None).ConfigureAwait(true))
                    {
                        this.Workspace.StopSolutionCrawler();

                        DisableRemoteHostClientService();

                        await UnregisterObjectBrowserLibraryManagerAsync(CancellationToken.None).ConfigureAwait(true);
                    }
                });

                // If we've created the language service then tell it it's time to clean itself up now.
                if (_languageService != null)
                {
                    _languageService.TearDown();
                    _languageService = null;
                }
            }

            base.Dispose(disposing);
        }
        protected override void Dispose(bool disposing)
        {
            if (_miscellaneousFilesWorkspace != null)
            {
                _miscellaneousFilesWorkspace.StopSolutionCrawler();
            }

            if (this.Workspace != null)
            {
                this.Workspace.StopSolutionCrawler();
            }

            // If we've created the language service then tell it it's time to clean itself up now.
            if (_languageService != null)
            {
                _languageService.TearDown();
                _languageService = null;
            }

            base.Dispose(disposing);
        }