public int FDoIdle(uint grfidlef)
        {
            PythonLanguage pl = GetService(typeof(PythonLanguage)) as PythonLanguage;

            if (pl != null)
            {
                pl.OnIdle((grfidlef & (uint)_OLEIDLEF.oleidlefPeriodic) != 0);
            }
            if (null != libraryManager)
            {
                libraryManager.OnIdle();
            }
            return(0);
        }
        private object CreateService(IServiceContainer container, Type serviceType)
        {
            object service = null;

            if (typeof(PythonLanguage) == serviceType)
            {
                PythonLanguage language = new PythonLanguage();
                language.SetSite(this);
                RegisterForIdleTime();
                service = language;
            }
            else if (typeof(IPythonLibraryManager) == serviceType)
            {
                libraryManager = new PythonLibraryManager(this);
                service        = libraryManager as IPythonLibraryManager;
            }
            return(service);
        }
 private object CreateService(IServiceContainer container, Type serviceType)
 {
     object service = null;
     if (typeof(PythonLanguage) == serviceType) {
         PythonLanguage language = new PythonLanguage();
         language.SetSite(this);
         RegisterForIdleTime();
         service = language;
     } else if (typeof(IPythonLibraryManager) == serviceType) {
         libraryManager = new PythonLibraryManager(this);
         service = libraryManager as IPythonLibraryManager;
     }
     return service;
 }