示例#1
0
文件: FsmESA.cs 项目: 0xCM/arrows
 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;
 }
示例#2
0
文件: Fsm.api.cs 项目: 0xCM/arrows
 /// <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);
示例#3
0
文件: Fsm.api.cs 项目: 0xCM/arrows
 /// <summary>
 /// Defines the most basic FSM, predicated only on ground-state, end-state and transition function
 /// </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="f">The transiion function</param>
 /// <typeparam name="E">The event type</typeparam>
 /// <typeparam name="S">The state type</typeparam>
 public static Fsm <E, S> Machine <E, S>(string id, IFsmContext context, S s0, S sZ, MachineTransition <E, S> f)
 => new Fsm <E, S>(id, context, s0, sZ, f);