Ejemplo n.º 1
0
        protected void AddTActionsToList(IList <TAction> list, XElement target)
        {
            if (target == null)
            {
                return;
            }
            foreach (XElement elem in target.Elements())
            {
                TAction action = null;
                switch (elem.Name.ToString())
                {
                case "SKIP_RECORD":
                    action = new TInterrupt(TInterrupt.Action.SKIP_RECORD);
                    break;

                case "STOP_LOOP":
                    action = new TInterrupt(TInterrupt.Action.STOP_LOOP);
                    break;

                case "Dynamic":
                    action = getVar(elem, true);
                    break;
                }
                if (action != null)
                {
                    list.Add(action);
                }
            }
        }
Ejemplo n.º 2
0
        public void TestAction()
        {
            TVariable  test = new TVariable("test");
            TInterrupt stop = new TInterrupt(TInterrupt.Action.STOP_LOOP);

            TCondition cond = new TCondition
            {
                x      = 15,
                mustBe = "25"
            };

            cond.onFalse.Add(test);
            cond.onTrue.Add(stop);
        }