internal IPropertyRule <TEntity> Compile()
        {
            CompilePropertyExpression(_propertyparser);

            PropertyRule <TEntity> proprule = null;

            if (!string.IsNullOrEmpty(_rule))
            {
                proprule = new PropertyRule <TEntity>(_context, _rule, _ruleparser.ParserRule(_context, _rule), _properties, _name, _description);
            }
            else
            {
                proprule = new PropertyRule <TEntity>(_context, _name, _rulefunc, _properties, _name, _description);
            }
            return(proprule);
        }
Exemple #2
0
        private EntryCriteriaRule <TEntity> CreateEntryCriteria()
        {
            EntryCriteriaRule <TEntity> entrycriteria = EntryCriteriaRule <TEntity> .TrueRule;

            if (!string.IsNullOrEmpty(_entryCriteria))
            {
                entrycriteria = new EntryCriteriaRule <TEntity>(_context, _entryCriteria,
                                                                _ruleparser.ParserRule(_context, _entryCriteria), EntryCriteriaRuleName());
            }
            else if (_entryCriteriaRulefunc != null)
            {
                entrycriteria = new EntryCriteriaRule <TEntity>(_context, EntryCriteriaRuleName(), _entryCriteriaRulefunc, EntryCriteriaRuleName());
            }

            return(entrycriteria);
        }