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); }
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); }