Exemple #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);
        }
Exemple #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);
            }
        }