/// <summary> /// Loads the given assembly and exposes the API to the user. /// </summary> static public void LoadAssembly(string file) { lock (evaluator_lock){ var a = loader.LoadAssemblyFile(file); if (a != null) { loader.Importer.ImportAssembly(a, RootContext.ToplevelTypes.GlobalRootNamespace); } } }
/// <summary> /// Loads the given assembly and exposes the API to the user. /// </summary> public void LoadAssembly (string file) { var loader = new DynamicLoader (importer, ctx); var assembly = loader.LoadAssemblyFile (file, false); if (assembly == null) return; lock (evaluator_lock){ importer.ImportAssembly (assembly, module.GlobalRootNamespace); } }