Ejemplo n.º 1
0
        public ScriptingEngine()
        {
            TypeManager.Initialize(new StandartTypeManager());
            GlobalsManager.Reset();
            ContextDiscoverer.DiscoverClasses(System.Reflection.Assembly.GetExecutingAssembly());

            _scriptFactory = new ScriptSourceFactory();
        }
Ejemplo n.º 2
0
        public void AttachExternalAssembly(System.Reflection.Assembly asm, RuntimeEnvironment globalEnvironment)
        {
            ContextDiscoverer.DiscoverClasses(asm);

            var lastCount = globalEnvironment.AttachedContexts.Count();

            ContextDiscoverer.DiscoverGlobalContexts(globalEnvironment, asm);

            var newCount = globalEnvironment.AttachedContexts.Count();

            while (lastCount < newCount)
            {
                _machine.AttachContext(globalEnvironment.AttachedContexts[lastCount]);
                ++lastCount;
            }
        }
Ejemplo n.º 3
0
 public void AttachAssembly(System.Reflection.Assembly asm, RuntimeEnvironment globalEnvironment)
 {
     ContextDiscoverer.DiscoverClasses(asm);
     ContextDiscoverer.DiscoverGlobalContexts(globalEnvironment, asm);
 }
Ejemplo n.º 4
0
 public void AttachAssembly(System.Reflection.Assembly asm)
 {
     ContextDiscoverer.DiscoverClasses(asm);
 }