Example #1
0
 public MemberAccessFilterExpression(FilterExpression instance, string member)
 {
     Instance = instance;
     Member   = member;
 }
Example #2
0
 public static MemberAccessFilterExpression MemberAccess(FilterExpression instance, string memberName)
 {
     return(new MemberAccessFilterExpression(instance, memberName));
 }
Example #3
0
 public static BinaryFilterExpression Binary(FilterExpression left, FilterExpressionOperator op, FilterExpression right)
 {
     return(new BinaryFilterExpression(left, op, right));
 }
Example #4
0
 public static UnaryFilterExpression Unary(FilterExpressionOperator op, FilterExpression operand)
 {
     return(new UnaryFilterExpression(op, operand));
 }
Example #5
0
        public BinaryFilterExpression(FilterExpression left, FilterExpressionOperator op, FilterExpression right)
        {
            if (left == null)
            {
                throw new ArgumentNullException("left", "Left operand of a binary expression cannot be null.");
            }

            if (right == null)
            {
                throw new ArgumentNullException("right", "Right operand of a binary expression cannot be null.");
            }

            if (op == FilterExpressionOperator.Unknown)
            {
                throw new ArgumentException("Cannot create binary expression with the 'Unknown' operator.", "op");
            }

            Left     = left;
            Operator = op;
            Right    = right;
        }