Esempio n. 1
0
        public void Execute(T obj)
        {
            var value = VariableEvaluation <T> .Evaluate(Value, obj);

            var dynamicAction = Dynamic.GetActionPredicate <T>(FieldName, ExpressionOperator, value);

            dynamicAction.DynamicInvoke(obj);
        }
        public bool Validate(T obj)
        {
            if (_conditions != null)
            {
                return(_conditions(obj));
            }

            var value = VariableEvaluation <T> .Evaluate(Value, obj);

            var dynamicCondition = Dynamic.GetConditionPredicate <T>(FieldName, ExpressionOperator, value);

            return(dynamicCondition(obj));
        }