Example #1
0
 public Option <S> Eval(E input, S source)
 => Rule(Fsm.TransitionRuleKey(input, source)).TryMap(r => r.Target);
Example #2
0
 public MachineTransition(IEnumerable <TransitionRule <E, S> > rules)
 {
     this.RuleIndex = rules.Select(x => (Fsm.TransitionRuleKey(x.Trigger, x.Source).Hash, x as ITransitionRule <E, S>)).ToDictionary();
 }