Beispiel #1
0
        public PulsarAction AddAction(PulsarAction action)
        {
            List <PulsarAction> singleAction = new List <PulsarAction>
            {
                action
            };

            return(AddActions(singleAction, PulsarAction.ActionType.Single));
        }
Beispiel #2
0
        private PulsarAction AddActionParallel(List <PulsarAction> pulsarActions)
        {
            var pulsarAction = new PulsarAction(Node, false)
            {
                Type = PulsarAction.ActionType.Parallel
            };

            pulsarAction.AddActionsToSet(pulsarActions);

            return(pulsarAction);
        }
Beispiel #3
0
        private PulsarAction AddActionSequence(List <PulsarAction> pulsarActions)
        {
            var pulsarAction = new PulsarAction(Node, false)
            {
                Type = PulsarAction.ActionType.Sequence
            };

            pulsarAction.AddActionsToSet(pulsarActions);

            return(pulsarAction);
        }
Beispiel #4
0
        private PulsarAction AddActions(List <PulsarAction> actionsList, PulsarAction.ActionType actionType)
        {
            PulsarAction pulsarAction = null;

            switch (actionType)
            {
            case PulsarAction.ActionType.Single:
                pulsarAction = actionsList?.ElementAt(0);
                break;

            case PulsarAction.ActionType.Parallel:
                pulsarAction = AddActionParallel(actionsList);
                break;

            case PulsarAction.ActionType.Sequence:
                pulsarAction = AddActionSequence(actionsList);
                break;
            }

            _actions.Add(pulsarAction);

            return(pulsarAction);
        }
Beispiel #5
0
 public void AddActionToSet(PulsarAction action)
 {
     _actionSet.Add(action);
 }