public When_ When(Rule rule) { When_ when = new When_(rule); when.Rules.Add(rule); Whens.Add(when); return(when); }
public void Run(T t) { while (Next()) { Whens.ForEach(x => x.Eval(t)); When_ when = Whens.FirstOrDefault(x => x.IsTrue); if (when != null) { when.Actions.ForEach(x => x(t)); } } }
internal void Step() { if (Next()) { Whens.ForEach(x => x.Eval(this)); When_ when = Whens.FirstOrDefault(x => x.IsTrue); if (when != null) { when.Actions.ForEach(x => x(this)); } } }
public Then_(When_ when) { _when = when; }