private object CreateService(IServiceContainer container, Type serviceType) { if (GetLibraryManagerType() == serviceType) { return _libraryManager = CreateLibraryManager(this); } return null; }
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); } }