Boo.Lang.Compiler.CompilerParameters.LoadAssemblyFromLibPaths C# (CSharp) Метод

LoadAssemblyFromLibPaths() приватный Метод

private LoadAssemblyFromLibPaths ( string assembly, bool throwOnError ) : Assembly
assembly string
throwOnError bool
Результат System.Reflection.Assembly
        private Assembly LoadAssemblyFromLibPaths(string assembly, bool throwOnError)
        {
            Assembly a = null;
            string fullLog = "";
            foreach (string dir in _libPaths)
            {
                string full_path = Path.Combine(dir, assembly);
                FileInfo file = new FileInfo(full_path);
                if (!IsAssemblyExtension(file.Extension))
                    full_path += ".dll";

                try
                {
                    a = Assembly.LoadFrom(full_path);
                    if (a != null)
                    {
                        return a;
                    }
                }
                catch (FileNotFoundException ff)
                {
                    fullLog += ff.FusionLog;
                    continue;
                }
            }
            if (throwOnError)
            {
                throw new ApplicationException(string.Format(Boo.Lang.Resources.StringResources.BooC_CannotFindAssembly, assembly));
                //assembly, total_log)); //total_log contains the fusion log
            }
            return a;
        }