Ejemplo n.º 1
0
        // find all extensions under a given directory
        public static List <PyRevitExtension> FindExtensions(string searchPath)
        {
            var installedExtensions = new List <PyRevitExtension>();

            logger.Debug("Looking for installed extensions under \"{0}\"...", searchPath);
            foreach (var subdir in Directory.GetDirectories(searchPath))
            {
                if (PyRevitExtension.IsExtensionDirectory(subdir))
                {
                    logger.Debug("Found installed extension \"{0}\"...", subdir);
                    installedExtensions.Add(new PyRevitExtension(subdir));
                }
            }

            return(installedExtensions);
        }