Esempio n. 1
0
        internal virtual void SetResult(LogicDefine.Rule rule, bool result)
        {
            EvaluatorKey key = new EvaluatorKey()
            {
                Context = rule.Context?.ToString(), Id = rule.Id
            };

            if (this.results.ContainsKey(key.ToString()))
            {
                this.results.Remove(key.ToString());
            }
            this.results.Add(key.ToString(), result);
        }
Esempio n. 2
0
        internal virtual bool?GetResult(LogicDefine.Rule rule)
        {
            EvaluatorKey key = new EvaluatorKey()
            {
                Id = rule.Id, Context = rule.Context?.ToString()
            };

            if (results.ContainsKey(key.ToString()))
            {
                return(results[key.ToString()]);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 3
0
 public UnknownEvaluatorException(EvaluatorKey requestedEvaluator, string source)
     : base(String.Format(_messageTemplate, source, requestedEvaluator))
 {
 }