internal Fsm(string Id, IFsmContext context, S GroundState, S EndState, MachineTransition <E, S> Transition, EntryFunction <S, A> Entry, ExitFunction <S, A> Exit) : base(Id, context, GroundState, EndState, Transition) { this.EntryFunc = Entry; this.ExitFunc = Exit; }
/// <summary> /// Defines a machine that supports entry/exit actions on a per-state basis /// </summary> /// <param name="id">Identifies the machine within the context of the executing process</param> /// <param name="s0">The ground-state</param> /// <param name="sZ">The end-state</param> /// <param name="t">The transition function</param> /// <param name="entry">The entry function</param> /// <param name="exit">The exit function</param> /// <typeparam name="E">The event type</typeparam> /// <typeparam name="S">The state type</typeparam> /// <typeparam name="A">The entry action type</typeparam> public static Fsm <E, S, A> Machine <E, S, A>(string id, IFsmContext context, S s0, S sZ, MachineTransition <E, S> t, EntryFunction <S, A> entry, ExitFunction <S, A> exit) => new Fsm <E, S, A>(id, context, s0, sZ, t, entry, exit);