Пример #1
0
        protected override Expression VisitBinary(BinaryExpression b)
        {
            switch (b.NodeType)
            {
            case ExpressionType.AndAlso:
                Visit(b.Left);
                Visit(b.Right);
                break;

            case ExpressionType.Equal:
            case ExpressionType.NotEqual:
            case ExpressionType.GreaterThanOrEqual:
            case ExpressionType.GreaterThan:
            case ExpressionType.LessThanOrEqual:
            case ExpressionType.LessThan:
                var predicate = new BinaryPredicate(b);
                this.m_predicates.Add(predicate);
                break;

            default:
                throw new NotSupportedException(
                          String.Format("{0} is not supported", b.NodeType));
            }

            return(b);
        }
Пример #2
0
        protected override Expression VisitBinary(BinaryExpression b)
        {
            switch (b.NodeType)
            {
                case ExpressionType.AndAlso:
                    Visit(b.Left);
                    Visit(b.Right);
                    break;
                case ExpressionType.Equal:
                case ExpressionType.NotEqual:
                case ExpressionType.GreaterThanOrEqual:
                case ExpressionType.GreaterThan:
                case ExpressionType.LessThanOrEqual:
                case ExpressionType.LessThan:
                    var predicate = new BinaryPredicate(b);
                    this.m_predicates.Add(predicate);
                    break;
                default:
                    throw new NotSupportedException(
                        String.Format("{0} is not supported", b.NodeType));
            }

            return b;
        }