コード例 #1
0
        public When_ When(Rule rule)
        {
            When_ when = new When_(rule);

            when.Rules.Add(rule);
            Whens.Add(when);
            return(when);
        }
コード例 #2
0
        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));
                }
            }
        }
コード例 #3
0
        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));
                }
            }
        }
コード例 #4
0
 public Then_(When_ when)
 {
     _when = when;
 }