Esempio n. 1
0
        public IAction <TModel> getAction(WorkDefine.ActionDefinition def)
        {
            WorkDefine.ActionDefinition withoutConvention = new WorkDefine.ActionDefinition()
            {
                Id          = ConventionHelper.RemoveConvention(def.Id, this.Configuration.Convention),
                Description = def.Description
            };
            IAction <TModel> toReturn = default(IAction <TModel>);



            if (this.actions.ContainsKey(withoutConvention.Id))
            {
                toReturn = this.actions[withoutConvention.Id];
            }

            else
            {
                toReturn = this.actions[def.Id];
            }

            return(toReturn);
        }
Esempio n. 2
0
        public IRuleEvaluatorX <TModel> GetRuleEvaluator(LogicDefine.Evaluator def)
        {
            LogicDefine.Evaluator withoutConvention = new LogicDefine.Evaluator()
            {
                Id          = ConventionHelper.RemoveConvention(def.Id, this.Configuration.Convention),
                Description = def.Description
            };
            IRuleEvaluatorX <TModel> toReturn = default(IRuleEvaluatorX <TModel>);



            if (this.evaluators.ContainsKey(withoutConvention.Id))
            {
                toReturn = this.evaluators[withoutConvention.Id];
            }

            else
            {
                toReturn = this.evaluators[def.Id];
            }

            return(toReturn);
        }