Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
        }