private static AssemblyName EnumerateCache(AssemblyName partialName) { new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Assert(); partialName.Version = null; ArrayList alAssems = new ArrayList(); Fusion.ReadCache(alAssems, partialName.FullName, 2); IEnumerator enumerator = alAssems.GetEnumerator(); AssemblyName name = null; CultureInfo cultureInfo = partialName.CultureInfo; while (enumerator.MoveNext()) { AssemblyName name2 = new AssemblyName((string)enumerator.Current); if (CulturesEqual(cultureInfo, name2.CultureInfo)) { if (name == null) { name = name2; } else if (name2.Version > name.Version) { name = name2; } } } return(name); }
private AssemInfo[] GetDisplayedAssemblies() { if (_gacAssemblies == null) { var assemblies = new ArrayList(); Fusion.ReadCache(assemblies, Fusion.CacheType.GAC); Fusion.ReadCache(assemblies, Fusion.CacheType.Zap); _gacAssemblies = assemblies.Cast <object>().Select(obj => new AssemInfo(obj)).ToArray(); } return(!string.IsNullOrEmpty(boxFilter.Text) ? _gacAssemblies.Where(e => e.Name.IndexOf(boxFilter.Text) != -1).ToArray() : _gacAssemblies); }