Ejemplo n.º 1
0
        public void Setup(ActionSet actionSet)
        {
            if (IsSetup)
            {
                return;
            }
            IsSetup = true;

            SkipCount  = Rule.DeltinScript.VarCollection.Assign("continueSkip", Rule.IsGlobal, true);
            TempHolder = Rule.DeltinScript.VarCollection.Assign("continueSkipTemp", Rule.IsGlobal, true);

            A_SkipIf skipAction = Element.Part <A_SkipIf>
                                  (
                // Condition
                Element.Part <V_Compare>(SkipCount.GetVariable(), EnumData.GetEnumValue(Operators.Equal), new V_Number(0)),
                // Number of actions
                new V_Number(3)
                                  );

            Skipper           = new SkipStartMarker(actionSet);
            Skipper.SkipCount = TempHolder.GetVariable();

            IActionList[] actions = ArrayBuilder <IActionList> .Build(
                new ALAction(A_Wait.MinimumWait),
                new ALAction(skipAction),
                new ALAction(TempHolder.SetVariable((Element)SkipCount.GetVariable())[0]),
                new ALAction(SkipCount.SetVariable(0)[0]),
                Skipper
                );

            Rule.Actions.InsertRange(0, actions);
        }
Ejemplo n.º 2
0
 public void SetSkipCount(ActionSet actionSet, Element skipCount)
 {
     CheckSetup();
     actionSet.AddAction(SkipCount.SetVariable(skipCount));
 }