/// <summary> /// Conditionally return the true or false part, dependention on the criterion /// </summary> /// <param name="criterion">The criterion.</param> /// <param name="whenTrue">The when true.</param> /// <param name="whenFalse">The when false.</param> /// <returns></returns> public static AbstractProjection Conditional(AbstractExpression criterion, AbstractProjection whenTrue, AbstractProjection whenFalse) { return(new ConditionalProjection(criterion, whenTrue, whenFalse)); }
/// <summary> /// Return the negation of an expression /// </summary> /// <param name="expression">The Expression to negate.</param> /// <returns>A <see cref="NotExpression" />.</returns> public static AbstractExpression Not(AbstractExpression expression) { return(new NotExpression(expression)); }
/// <summary> /// Adds an <see cref="AbstractExpression"/> to the list of <see cref="AbstractExpression"/>s /// to junction together. /// </summary> /// <param name="criterion">The <see cref="AbstractExpression"/> to add.</param> /// <returns> /// This <see cref="Junction"/> instance. /// </returns> public Junction Add(AbstractExpression criterion) { _criteria.Add(criterion); return(this); }
public CriterionEntry(AbstractExpression expression, Filter filter) { _expression = expression; _filter = filter; }
/// <summary> /// Conditionally return the true or false part, dependention on the criterion /// </summary> /// <param name="criterion">The criterion.</param> /// <param name="whenTrue">The when true.</param> /// <param name="whenFalse">The when false.</param> /// <returns></returns> public static AbstractProjection Conditional(AbstractExpression criterion, AbstractProjection whenTrue, AbstractProjection whenFalse) { return new ConditionalProjection(criterion, whenTrue, whenFalse); }
/// <summary> /// Adds an <see cref="AbstractExpression"/> to the list of <see cref="AbstractExpression"/>s /// to junction together. /// </summary> /// <param name="criterion">The <see cref="AbstractExpression"/> to add.</param> /// <returns> /// This <see cref="Junction"/> instance. /// </returns> public Junction Add(AbstractExpression criterion) { _criteria.Add(criterion); return this; }
/// <summary> /// Add an Expression to constrain the results to be retrieved. Will be added with "OR" /// </summary> /// <param name="expression"></param> /// <returns></returns> public virtual IFilter AddOr(AbstractExpression expression) { if (_junction == null) { _junction = Expression.Disjunction().Add(expression); } else { _junction = Expression.Disjunction().Add(_junction).Add(expression); } return this; }
public CriterionEntry(AbstractExpression expression, Filter filter) { _expression = expression; _filter = filter; }