private static bool ProbeViaLoadedAssemblies(
            ICollection <Assembly> loadedAssemblies,
            AssemblyName resolve,
            string resolveFileName,
            Assembly requesting,
            string sourceName,
            bool isLog,
            out Assembly resolvedAssembly)
        {
            bool       first   = AssemblySatelliteResolver.EntryCount.GetOrAdd(resolve.Name, (Func <string, AssemblySatelliteResolver.IntRef>)(_ => new AssemblySatelliteResolver.IntRef(0))).Increment() == 1;
            List <Uri> uriList = new List <Uri>(loadedAssemblies.Count);

            foreach (Assembly loadedAssembly in (IEnumerable <Assembly>)loadedAssemblies)
            {
                AssemblyName name = loadedAssembly.GetName();
                if (!(requesting != (Assembly)null) || requesting.Equals((object)loadedAssembly) || name.Name.Equals(sourceName, StringComparison.OrdinalIgnoreCase))
                {
                    uriList.AddRange(AssemblySatelliteResolver.GetAssemblyBaseUris(loadedAssembly));
                }
            }
            List <string> list = AssemblySatelliteResolver.ExpandCulture(resolve.CultureInfo).ToList <string>();
            Assembly      resolvedAssembly1;

            if (AssemblySatelliteResolver.ProbeForAssemblySatellite((IEnumerable <Uri>)uriList, list, resolve, resolveFileName, isLog, first, out resolvedAssembly1))
            {
                resolvedAssembly = resolvedAssembly1;
                return(true);
            }
            if (isLog)
            {
                string str = string.Format("Cannot resolve \"{0}\".{1}", (object)resolve, AssemblySatelliteResolver.GetDebugStackTrace());
                if (resolve.Name.StartsWith("SolarWinds", StringComparison.OrdinalIgnoreCase) && ((IEnumerable <string>)LocaleConfiguration.get_InstalledLocales()).Intersect <string>((IEnumerable <string>)list, (IEqualityComparer <string>)StringComparer.OrdinalIgnoreCase).Any <string>())
                {
                    AssemblySatelliteResolver.log.Warn((object)str);
                }
                else
                {
                    AssemblySatelliteResolver.log.Debug((object)str);
                }
            }
            resolvedAssembly = (Assembly)null;
            return(false);
        }
        // Token: 0x06000039 RID: 57 RVA: 0x000036CC File Offset: 0x000018CC
        private static bool ProbeViaLoadedAssemblies(ICollection <Assembly> loadedAssemblies, AssemblyName resolve, string resolveFileName, Assembly requesting, string sourceName, bool isLog, out Assembly resolvedAssembly)
        {
            bool       first = AssemblySatelliteResolver.EntryCount.GetOrAdd(resolve.Name, (string _) => new AssemblySatelliteResolver.IntRef(0)).Increment() == 1;
            List <Uri> list  = new List <Uri>(loadedAssemblies.Count);

            foreach (Assembly assembly in loadedAssemblies)
            {
                AssemblyName name = assembly.GetName();
                if (!(requesting != null) || requesting.Equals(assembly) || name.Name.Equals(sourceName, StringComparison.OrdinalIgnoreCase))
                {
                    list.AddRange(AssemblySatelliteResolver.GetAssemblyBaseUris(assembly));
                }
            }
            List <string> list2 = AssemblySatelliteResolver.ExpandCulture(resolve.CultureInfo).ToList <string>();
            Assembly      assembly2;

            if (AssemblySatelliteResolver.ProbeForAssemblySatellite(list, list2, resolve, resolveFileName, isLog, first, out assembly2))
            {
                resolvedAssembly = assembly2;
                return(true);
            }
            if (isLog)
            {
                string text = string.Format("Cannot resolve \"{0}\".{1}", resolve, AssemblySatelliteResolver.GetDebugStackTrace());
                if (resolve.Name.StartsWith("SolarWinds", StringComparison.OrdinalIgnoreCase) && LocaleConfiguration.InstalledLocales.Intersect(list2, StringComparer.OrdinalIgnoreCase).Any <string>())
                {
                    AssemblySatelliteResolver.log.Warn(text);
                }
                else
                {
                    AssemblySatelliteResolver.log.Debug(text);
                }
            }
            resolvedAssembly = null;
            return(false);
        }
 private static Uri GetAssemblyLocation(Assembly assembly)
 {
     return(AssemblySatelliteResolver.GetAssemblyBaseUris(assembly).LastOrDefault <Uri>());
 }