Example #1
0
        public override bool AddAction(ISignalAction action)
        {
            if (action == null || this.actions.Contains(action))
            {
                return(false);
            }

            switch (action)
            {
            case ISignalAction <TState, TTransition, TSignal> actionSTS:
                actionSTS.Signal = this;
                break;

            case ISignalAction <TSignal> actionT:
                actionT.Signal = this;
                break;

            default:
                action.Signal = this;
                break;
            }

            this.actions.Add(action);
            return(true);
        }
 public Signal <TState, TTransition, TSignal> Action(ISignalAction action)
 {
     AddAction(action);
     return(this);
 }
Example #3
0
 public abstract bool AddAction(ISignalAction action);
 public OrthogonalSignal <TState, TTransition, TSignal> On(
     ISignalAction action)
 {
     this.Signal.On(action);
     return(this);
 }