예제 #1
0
        public void Dispose()
        {
            // This will probably never be called by VS, but we use it in unit
            // tests to avoid leaking memory when we reinitialize state between
            // each test.

            if (_langPrefs.IsValueCreated)
            {
                _langPrefs.Value.Dispose();
            }

            if (_interpreterOptionsService.IsValueCreated)
            {
                _interpreterOptionsService.Value.DefaultInterpreterChanged -= UpdateDefaultAnalyzer;
                (_interpreterOptionsService.Value as IDisposable)?.Dispose();
            }

            _idleManager.Dispose();

            foreach (var window in _codeWindowManagers.Values.ToArray())
            {
                window.RemoveAdornments();
            }
            _codeWindowManagers.Clear();
        }
예제 #2
0
        public void Dispose()
        {
            if (_langPrefs.IsValueCreated)
            {
                _langPrefs.Value.Dispose();
            }

            _idleManager.Dispose();

            EnvironmentSwitcherManager.Dispose();
            WorkspaceInfoBarManager.Dispose();
        }
예제 #3
0
        public void Dispose()
        {
            // This will probably never be called by VS, but we use it in unit
            // tests to avoid leaking memory when we reinitialize state between
            // each test.

            IDisposable disposable;

            if (_langPrefs != null && _langPrefsTextManagerCookie != 0)
            {
                IVsTextManager textMgr = (IVsTextManager)_container.GetService(typeof(SVsTextManager));
                if (textMgr != null)
                {
                    Guid             guid = typeof(IVsTextManagerEvents2).GUID;
                    IConnectionPoint connectionPoint;
                    ((IConnectionPointContainer)textMgr).FindConnectionPoint(ref guid, out connectionPoint);
                    connectionPoint.Unadvise(_langPrefsTextManagerCookie);
                }
            }

            if (_interpreterRegistry != null)
            {
                _interpreterRegistry.InterpretersChanged -= InterpretersChanged;
            }

            if (_interpreterOptionsService != null)
            {
                _interpreterOptionsService.DefaultInterpreterChanged -= UpdateDefaultAnalyzer;
            }

            if ((disposable = _interpreterOptionsService as IDisposable) != null)
            {
                disposable.Dispose();
            }

            _idleManager.Dispose();

            foreach (var window in _codeWindowManagers.Values)
            {
                window.RemoveAdornments();
            }
            _codeWindowManagers.Clear();
        }
예제 #4
0
        public void Dispose()
        {
            if (_langPrefs.IsValueCreated)
            {
                _langPrefs.Value.Dispose();
            }

            _idleManager.Dispose();

            foreach (var window in _codeWindowManagers.Values.ToArray())
            {
                window.RemoveAdornments();
            }
            _codeWindowManagers.Clear();

            foreach (var kv in GetActiveSharedAnalyzers())
            {
                kv.Value.Dispose();
            }
        }
예제 #5
0
 public void Dispose()
 {
     _infoBar?.Close();
     _idleManager.OnIdle -= OnIdle;
     _idleManager.Dispose();
 }