Exemple #1
0
        public static ExpressionSpecification <T> operator !(ExpressionSpecification <T> spec)
        {
            UnaryExpression unaryExpression = System.Linq.Expressions.Expression.MakeUnary(ExpressionType.Not, spec.Expression.Body, typeof(bool));

            return(new ExpressionSpecification <T>(ExpressionSpecification <T> .toLambda(unaryExpression, spec.Expression.Parameters)));
        }
Exemple #2
0
        public static ExpressionSpecification <T> operator |(ExpressionSpecification <T> leftSide, ExpressionSpecification <T> rightSide)
        {
            BinaryExpression binaryExpression = ExpressionSpecification <T> .mergeIntoBinary(rightSide.Expression, leftSide.Expression, ExpressionType.OrElse);

            return(new ExpressionSpecification <T>(ExpressionSpecification <T> .toLambda(binaryExpression, leftSide.Expression.Parameters)));
        }