Пример #1
0
        private static object executeScriptTree(ScriptTree tree)
        {
            List<ScriptNode> graph = tree.CreateScriptModel();

            foreach (ScriptNode node in graph)
            {
                node.PreProcess();
            }

            foreach (ScriptNode node in graph)
            {
                node.Process();
            }

            ExecutionContext context = new ExecutionContext();

            foreach (ScriptNode node in graph)
            {
                node.Execute(context);
            }

            return context.CurrentBlockWeb;
        }