private void Load(AssemblyName assemblyName) { if (ShouldLoad(assemblyName)) { var assembly = Assembly.Load(assemblyName); NewAssemblies.Add(assembly); LoadReferenced(assembly); } }
private void Load(string path) { var assembly = Assembly.LoadFile(path); if (ShouldLoad(assembly.GetName())) { NewAssemblies.Add(assembly); LoadReferenced(assembly); } }
private static bool ShouldLoad(AssemblyName assemblyName) { var shouldLoad = !NewAssemblies.Contains(assemblyName) && !PreviouslyLoadedAssemblies.Contains(assemblyName); return(shouldLoad); }