Example #1
0
 protected override void Deserialize(CodeReader reader)
 {
     this.Child1 = (EngineContextNodeBase)EngineContextFactory.Create(reader);
     this.Child2 = (EngineContextNodeBase)EngineContextFactory.Create(reader);
     this.Child3 = (EngineContextNodeBase)EngineContextFactory.Create(reader);
     this.Child4 = (EngineContextNodeBase)EngineContextFactory.Create(reader);
 }
Example #2
0
        protected override void Deserialize(CodeReader reader)
        {
            var decls = new ArrayList();

            while (reader.Current != WorkflowCommonDefs.CompilerSegmentEnd)
            {
                IContextSerializer instance = EngineContextFactory.Create(reader);
                var tpl  = instance as EngineVariableTemplate;
                var node = instance as EngineContextNodeBase;

                if (tpl != null)
                {
                    decls.Add(tpl);
                }
                else if (node != null)
                {
                    this.Child = node;
                }
            }

            if (decls.Count > 0)
            {
                this.Declarations = (EngineVariableTemplate[])decls.ToArray(typeof(EngineVariableTemplate));
            }
        }
Example #3
0
        public static EngineContextRoot Create(
            Delegate[] globals,
            string text)
        {
            var reader = new CodeReader(
                globals,
                text);

            return(EngineContextFactory.Create(reader) as EngineContextRoot);
        }