示例#1
0
        public Condition <T> FieldOperation(string field, EMathOperator oper)
        {
            Contract.Requires(!String.IsNullOrWhiteSpace(field));
            Contract.Requires(oper != EMathOperator.None);

            ClauseOperationElement elem = new ClauseOperationElement();

            ClauseVariable var = new ClauseVariable();

            var.Name         = field;
            elem.LeftElement = var;

            elem.Operator = oper;

            return(AddClause(elem));
        }
示例#2
0
        public Condition <T> InCondition(string field, EListOperator oper)
        {
            Contract.Requires(!String.IsNullOrWhiteSpace(field));
            Contract.Requires(oper == EListOperator.In || oper == EListOperator.NotIn);
            CheckRoot();

            ListCondition <T> condition = new ListCondition <T>();
            ClauseVariable    var       = new ClauseVariable();

            var.Name = field;
            condition.LeftElement = var;
            condition.Operator    = oper;

            AddCondition(condition);

            return(condition);
        }
示例#3
0
        public Condition <T> Compare(string field, EBasicOperator oper)
        {
            Contract.Requires(!String.IsNullOrWhiteSpace(field));
            Contract.Requires(oper != EBasicOperator.None);
            CheckRoot();

            BasicCondition <T> condition = new BasicCondition <T>();

            ClauseVariable var = new ClauseVariable();

            var.Name = field;
            condition.LeftElement = var;

            condition.Operator = oper;

            AddCondition(condition);
            return(condition);
        }