protected override void Dispose(bool disposing) { try { if (_componentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { mgr.FRevokeComponent(_componentID); } _componentID = 0; } if (null != _libraryManager) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
private object CreateService(IServiceContainer container, Type serviceType) { if (GetLibraryManagerType() == serviceType) { return _libraryManager = CreateLibraryManager(this); } return null; }
private void OnLibraryManagerSearchPathsChanged(object sender, LibraryManager.SearchPathsChangedEventArgs args) { if (_analyzer == null) return; _analyzer.ClearSearchPaths(); _analyzer.AddSearchPaths(args.SearchPaths); }