예제 #1
0
파일: Criteria.cs 프로젝트: rexzh/RexToy
        internal CompositeCriteria(Criteria left, LogicType logic, Criteria right)
        {
            left.ThrowIfNullArgument(nameof(left));
            right.ThrowIfNullArgument(nameof(right));
            logic.ThrowIfEnumOutOfRange();

            _left = left;
            _right = right;
            _logic = logic;
        }
예제 #2
0
        public virtual StringBuilder BuildWhereFilters(Criteria criteria, IEnumerable<SingleEntityView> svList)
        {
            criteria.ThrowIfNullArgument(nameof(criteria));
            svList.ThrowIfNullArgument(nameof(svList));

            _svList = svList;
            _str = new StringBuilder();
            Visit(criteria);
            _str.UnBracketing(StringPair.Parenthesis);
            return _str;
        }
예제 #3
0
        protected void Visit(Criteria criteria)
        {
            switch (criteria.CriteriaType)
            {
                case CriteriaType.Single:
                    Visit((SingleExpressionCriteria)criteria);
                    break;

                case CriteriaType.Composite:
                    Visit((CompositeCriteria)criteria);
                    break;
            }
        }
예제 #4
0
파일: Query.cs 프로젝트: rexzh/RexToy
 public Query(View view, Criteria criteria)
 {
     _view = view;
     //Note:criteria can be null, view.OrderBy(..) or view.AsQuery()
     _criteria = criteria;
 }