public void RemoveSinkManager(IErrorListSinkManager manager)
 {
     // This call can, in theory, happen from any thread so be appropriately thread safe.
     // In practice, it will probably be called only once from the UI thread (by the error list tool window).
     lock (_managers) {
         _managers.Remove(manager);
     }
 }
        public void AddSinkManager(IErrorListSinkManager manager)
        {
            // This call can, in theory, happen from any thread so be appropriately thread safe.
            // In practice, it will probably be called only once from the UI thread (by the error list tool window).
            lock (_managers) {
                _managers.Add(manager);

                // Add the pre-existing error factories to the manager.
                foreach (var errorFactory in _errorListFactories)
                {
                    manager.AddErrorListFactory(errorFactory);
                }
            }
        }