예제 #1
0
파일: Projection.cs 프로젝트: KorzunAV/Plan
 /// <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));
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
파일: Junction.cs 프로젝트: KorzunAV/Plan
 /// <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);
 }
예제 #4
0
 public CriterionEntry(AbstractExpression expression, Filter filter)
 {
     _expression = expression;
     _filter     = filter;
 }
예제 #5
0
파일: Projection.cs 프로젝트: NecoMeco/Plan
 /// <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);
 }
예제 #6
0
파일: Junction.cs 프로젝트: NecoMeco/Plan
 /// <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;
 }
예제 #7
0
파일: Filter.cs 프로젝트: NecoMeco/Plan
 /// <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;
 }
예제 #8
0
 public CriterionEntry(AbstractExpression expression, Filter filter)
 {
     _expression = expression;
     _filter = filter;
 }