public Expression BoolUnaryExpression(BoolUnaryExpression expression) { if (expression.Operator != Operator.Not) { throw new NotSupportedException(); } return(expression.Expression); }
public override ICriterion BoolUnaryExpression(BoolUnaryExpression expression) { var criterion = CreateCriterion(expression.Expression); switch (expression.Operator) { case Operator.Not: return(Restrictions.Not(criterion)); default: throw new NotSupportedException(); } }
private Expression ResolveBoolUnaryLiteral(BoolUnaryExpression expression, LiteralExpression literal) { if (expression.Operator != Operator.Not) { throw new NotSupportedException(); } // CoerceBoolExpression takes care of the type of the literal. Debug.Assert(literal.LiteralType == LiteralType.Boolean); return(new LiteralExpression(!(bool)literal.Value, LiteralType.Boolean)); }
public Expression BoolUnaryExpression(BoolUnaryExpression expression) { var result = expression.Expression.Visit(this); var literal = result as LiteralExpression; if (literal != null) { return(ResolveBoolUnaryLiteral(expression, literal)); } return(new BoolUnaryExpression(expression.Operator, result)); }
public virtual T BoolUnaryExpression(BoolUnaryExpression expression) { throw new QueryNotSupportException(); }