static Environment() { Runtime.Import(typeof(Environment).Assembly); string fp = System.IO.Path.GetDirectoryName(typeof(Environment).Assembly.Location) + System.IO.Path.DirectorySeparatorChar + "lsc.exe"; if (System.IO.File.Exists(fp)) { Assembly a = AssemblyCache.LoadAssembly(fp); Runtime.Import(a); } }
public static object Import(string assembly, Environment environment) { string fn = Path.GetFullPath(assembly); Assembly ass = AssemblyCache.LoadAssembly(fn); ass = Import(ass); if (ass != null) { environment.UpdateBindings(); return(Path.GetFileName(fn)); } else { return(null); } }
public static Object Reference(Cons args, Environment environment) { object result = null; foreach (object module in args) { if (module is string) { result = AssemblyCache.LoadAssembly((string)module); } else { throw new LSharpException(String.Format("Reference: {0} is not a string", module)); } } return(result); }