예제 #1
0
파일: eval.cs 프로젝트: liquidboy/ILSpy
 /// <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);
         }
     }
 }
예제 #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);
			}
		}
예제 #3
0
파일: eval.cs 프로젝트: KAW0/Alter-Native
		/// <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);
			}
		}