protected override void Dispose(bool disposing) { try { _mySolutionListener.Dispose(); if (_componentID != 0) { IOleComponentManager mgr = GetIOleComponentManager(); mgr.FRevokeComponent(_componentID); _componentID = 0; } if (_libraryManager != null) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
private object CreateService(IServiceContainer container, Type serviceType) { if (serviceType == typeof(NemerleLanguageService)) { NemerleLanguageService language = new NemerleLanguageService(this); language.SetSite(this); RegisterForIdleTime(); return(language); } else if (serviceType == typeof(INemerleLibraryManager)) { return(_libraryManager = new NemerleLibraryManager(this)); } return(null); }