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); } } }
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); }