示例#1
0
        public bool SetTransitionTracer(Transition <T> otherTransition, TransitionTracer <T> transitionTracer)
        {
            Transition <T> transition = GetTransition(otherTransition);

            if (transition == null)
            {
                return(false);
            }
            transition.Tracer = transitionTracer;
            return(true);
        }
示例#2
0
        public bool SetTransitionTracer(State <T> stateFrom, State <T> stateTo, TransitionTracer <T> transitionTracer)
        {
            Transition <T> transition = GetTransition(stateFrom, stateTo);

            if (transition == null)
            {
                return(false);
            }
            transition.Tracer = transitionTracer;
            return(true);
        }
示例#3
0
        public bool SetTransitionTracer(T identifierFrom, T identifierTo, TransitionTracer <T> transitionTracer)
        {
            Transition <T> transition = GetTransition(identifierFrom, identifierTo);

            if (transition == null)
            {
                return(false);
            }
            transition.Tracer = transitionTracer;
            return(true);
        }
示例#4
0
        public bool AddTransition(State <T> otherStateFrom, State <T> otherStateTo, TransitionTracer <T> transitionTracer)
        {
            State <T> stateFrom = GetState(otherStateFrom);
            State <T> stateTo   = GetState(otherStateTo);

            if (stateFrom == null | stateTo == null)
            {
                return(false);
            }
            return(transitions.Add(new Transition <T>
            {
                StateFrom = stateFrom,
                StateTo = stateTo,
                Tracer = transitionTracer
            }));
        }
示例#5
0
        public bool AddTransition(T identifierFrom, T identifierTo, TransitionTracer <T> transitionTracer, TransitionAction <T> transitionAction)
        {
            State <T> stateFrom = GetState(identifierFrom);
            State <T> stateTo   = GetState(identifierTo);

            if (stateFrom == null | stateTo == null)
            {
                return(false);
            }
            return(transitions.Add(new Transition <T>
            {
                StateFrom = stateFrom,
                StateTo = stateTo,
                Tracer = transitionTracer,
                TAction = transitionAction
            }));
        }