コード例 #1
0
        public AssemblyReferences(ScriptingEngine engine)
        {
            this.engine = engine;

            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve;
        }
コード例 #2
0
ファイル: Workspace.cs プロジェクト: CedarLogic/CShell
        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;");
        }
コード例 #3
0
ファイル: Workspace.cs プロジェクト: xiaoxiongnpu/CShell
        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;");
        }