private static Assembly GetAssembly(string path) { foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) { try { if (asm.Location == path) { return(asm); } } catch (Exception) { // ignored } } return(ManagedApiLoader.LoadFile(path)); }
public static Assembly LoadFile(string file) { using (var loader = new ManagedApiLoader(file)) { return(loader.Load()); } }