示例#1
0
            public void AddAssembly(string assemblyName)
            {
                if (IsIgnored(assemblyName))
                {
                    return;
                }
                if (assemblies.Exists(a => a.Name == assemblyName))
                {
                    return;
                }
                var assembly = appDomain.LoadAssembly(assemblyName);

                if (assemblies.Exists(a => a.Name == assembly.Name))
                {
                    return;
                }
                assemblies.Add(assembly);
            }
示例#2
0
            public void AddAssembly(string name)
            {
                var assemblyName = name.StartsWith("file:///") ? name.Substring(8) : name;

                if (IsIgnored(assemblyName))
                {
                    return;
                }
                if (assemblies.Exists(a => a.Name == assemblyName))
                {
                    return;
                }
                var assembly = appDomain.LoadAssembly(assemblyName);

                if (assemblies.Exists(a => a.Name == assembly.Name))
                {
                    return;
                }
                assemblies.Add(assembly);
            }