Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the FieldOperationStatement class.
 /// </summary>
 public FieldOperationStatement(string field, FieldOperationStatementType type, ValueStatement value, FieldType fieldType)
 {
     if (String.IsNullOrEmpty(field))
         throw new ArgumentException("field is null or empty.", "field");
     if (value == null)
         throw new ArgumentNullException("value", "value is null.");
     Field = field;
     Type = type;
     Value = value;
     FieldType = fieldType;
 }
Ejemplo n.º 2
0
 public FieldOperationStatement(FieldStatement field, FieldOperationStatementType type, FieldStatement rightField)
 {
     Field          = field;
     Type           = type;
     RightStatement = rightField;
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Initializes a new instance of the FieldOperationStatement class.
 /// </summary>
 public FieldOperationStatement(FieldStatement field, FieldOperationStatementType type, ValueStatement rightValue)
 {
     Field          = field;
     Type           = type;
     RightStatement = rightValue;
 }
Ejemplo n.º 4
0
        private void BuildOperationFromMethodCall(MethodCallExpression m, MemberExpression me, FieldOperationStatementType fieldOperator,
                                                  bool isFieldOperator)
        {
            PushLocation(isFieldOperator ? WhereLocation.LeftOperatorClause : WhereLocation.BooleanOperation);
            var isNot = IsInNotBlock;

            if (isNot)
            {
                EnterNotBlock();
            }
            Visit(me);
            var leftStatement = _statement;

            if (isNot)
            {
                LeaveNotBlock();
            }
            PopLocation();

            if (isNot)
            {
                EnterNotBlock();
            }
            PushLocation(isFieldOperator ? WhereLocation.RightOperatorClause : WhereLocation.BooleanOperation);
            Visit(m.Arguments[0]);
            PopLocation();

            var rightStatement = _statement;

            if (isNot)
            {
                LeaveNotBlock();
            }

            CreateFieldOperatorStatement(fieldOperator, leftStatement, rightStatement);
        }