public AssemblyReferences(ScriptingEngine engine) { this.engine = engine; AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve; }
internal Workspace(string cshellFile) { CShellFile = Path.GetFullPath(cshellFile); CShellFileName = Path.GetFileNameWithoutExtension(cshellFile); this.engine = new ScriptingEngine(); assemblies = new AssemblyReferences(engine); //files = new FileReferences("Files"); RootFolder = Path.GetDirectoryName(cshellFile); RootFolder = Path.GetFullPath(RootFolder); //make sure we add the CShell assembly var cshellCoreAssembly = Assembly.GetExecutingAssembly(); assemblies.Add(new AssemblyReference(cshellCoreAssembly) { Removable = false }); engine.Evaluate("using CShell; using CShell.Sinks;"); }