Esempio n. 1
0
        public void Load()
        {
            _layers = ChainLoader.LoadChain("prefab_single", LayerDirectory);
            PythonScriptHost.Instance.LoadAssembly(typeof(PrefabSingleLogic).Assembly);
            _interpreter = LoadSingleLayer(_singleLayerName);

            UpdateLogic();
        }
Esempio n. 2
0
        private static PythonSingleLayer LoadSingleLayer(string pythonfile)
        {
            string name     = System.IO.Path.GetFileName(pythonfile);
            string fullpath = System.IO.Path.GetFullPath(System.IO.Path.GetDirectoryName(pythonfile));

            PythonScriptHost.Instance.AddPath(fullpath);
            PythonSingleLayer layer = new PythonSingleLayer(PythonScriptHost.Instance, File.ReadAllText(pythonfile), name);

            return(layer);
        }
Esempio n. 3
0
        public void UpdateLogic()
        {
            AnnotationUpdateUtility.UpdateInvalidatedLayers(_layers);
            Storage = RuntimeStorage.FromCouchDb("prefab_single_layer");
            var args = new ProcessAnnotationArgs(Storage, GetPtypes());

            if (File.Exists(_singleLayerName))
            {
                _interpreter = LoadSingleLayer(_singleLayerName);
                _interpreter.ProcessAnnotations(args);
            }
        }
Esempio n. 4
0
        private static PythonSingleLayer LoadSingleLayer(string pythonfile)
        {
            string name = System.IO.Path.GetFileName(pythonfile);
            string fullpath = System.IO.Path.GetFullPath(System.IO.Path.GetDirectoryName(pythonfile));
            PythonScriptHost.Instance.AddPath(fullpath);
            PythonSingleLayer layer = new PythonSingleLayer(PythonScriptHost.Instance, File.ReadAllText(pythonfile), name);

            return layer;
        }
Esempio n. 5
0
        public void UpdateLogic()
        {
            AnnotationUpdateUtility.UpdateInvalidatedLayers(_layers);
            Storage = RuntimeStorage.FromCouchDb("prefab_single_layer");
            var args = new ProcessAnnotationArgs(Storage, GetPtypes());

            if (File.Exists(_singleLayerName))
            {
                _interpreter = LoadSingleLayer(_singleLayerName);
                _interpreter.ProcessAnnotations(args);
            }
        }
Esempio n. 6
0
        public void Load()
        {
            _layers = ChainLoader.LoadChain("prefab_single", LayerDirectory);
            PythonScriptHost.Instance.LoadAssembly(typeof(PrefabSingleLogic).Assembly);
            _interpreter = LoadSingleLayer(_singleLayerName);

            UpdateLogic();
        }