Exemplo n.º 1
0
 /// <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);
         }
     }
 }
Exemplo n.º 2
0
		/// <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);
			}
		}
Exemplo n.º 3
0
		/// <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);
			}
		}