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)); }
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); }
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); }