Ejemplo n.º 1
0
        internal static ICollection <string> FindAssemblies(string basePath, int maxDepth)
        {
            List <string> stringList = new List <string>();

            if (maxDepth == 0)
            {
                return((ICollection <string>)stringList);
            }
            try
            {
                DirectoryInfo directoryInfo = new DirectoryInfo(basePath);
                stringList.AddRange(((IEnumerable <FileInfo>)directoryInfo.GetFiles()).Where <FileInfo>((Func <FileInfo, bool>)(file => AssemblyHelper.IsManagedAssembly(file.FullName))).Select <FileInfo, string>((Func <FileInfo, string>)(file => file.FullName)));
                foreach (DirectoryInfo directory in directoryInfo.GetDirectories())
                {
                    stringList.AddRange((IEnumerable <string>)AssemblyHelper.FindAssemblies(directory.FullName, maxDepth - 1));
                }
            }
            catch (Exception ex)
            {
            }
            return((ICollection <string>)stringList);
        }
Ejemplo n.º 2
0
 internal static ICollection <string> FindAssemblies(string basePath)
 {
     return(AssemblyHelper.FindAssemblies(basePath, 10));
 }