public static List GetAssemblyList()

in Managed/Util/GACManagedAccess.cs [21:55]


        public static List<string> GetAssemblyList(string assemblyName, bool getPhysicalPath)
        {
            if (string.IsNullOrEmpty(assemblyName))
            {
                throw new ArgumentNullException("assemblyName");
            }

            List<string> assemblyList = new List<string>();
            using (GacAssembly gacAssembly = new GacAssembly(assemblyName))
            {
                while (true)
                {
                    if (gacAssembly.GetNextAssembly())
                    {
                        if (getPhysicalPath)
                        {
                            using (GACAssemblyCache gacAssemblyCache = new GACAssemblyCache(assemblyName, gacAssembly.FullAssemblyName))
                            {
                                assemblyList.Add(gacAssemblyCache.AssemblyPath);
                            }
                        }
                        else
                        {
                            assemblyList.Add(gacAssembly.FullAssemblyName);
                        }
                    }
                    else
                    {
                        break;
                    }
                }
            }

            return assemblyList;
        }