示例#1
0
        public ScriptingEngine()
        {
            TypeManager.Initialize(new StandartTypeManager());
            GlobalsManager.Reset();
            ContextDiscoverer.DiscoverClasses(System.Reflection.Assembly.GetExecutingAssembly());

            _scriptFactory = new ScriptSourceFactory();
        }
示例#2
0
        public ScriptingEngine()
        {
            _machine = MachineInstance.Current;

            TypeManager.Initialize(new StandartTypeManager());
            TypeManager.RegisterType("Сценарий", typeof(UserScriptContextInstance));

            GlobalsManager.Reset();
            AttachAssembly(System.Reflection.Assembly.GetExecutingAssembly());

            _scriptFactory     = new ScriptSourceFactory();
            DirectiveResolvers = new DirectiveMultiResolver();
        }
 public void Dispose()
 {
     AttachedScriptsFactory.SetInstance(null);
     GlobalsManager.Reset();
 }