private Expression GetAssignExpression(Type propertyType, FilterOperator filterOperator, Expression left, ConstantExpression right) { var effectiveType = propertyType.GetEffectiveType(); if (effectiveType == typeof(string)) { return(StringExpressionFactory.Create(filterOperator, left, right, propertyType)); } if (effectiveType.IsNumericType()) { return(NumericExpressionFactory.Create(filterOperator, left, right, propertyType)); } if (effectiveType == typeof(bool)) { return(BooleanExpressionFactory.Create(filterOperator, left, right, propertyType)); } if (effectiveType == typeof(DateTime)) { return(DateTimeExpressionFactory.Create(filterOperator, left, right, propertyType)); } if (effectiveType.IsEnum()) { return(EnumExpressionFactory.Create(filterOperator, left, right, propertyType)); } return(null); }
public void CallStaticInteropFunctionThrowsNullReferenceException601() { AphidInterpreter aphidInterpreter; BooleanExpression booleanExpression; CallExpression callExpression; AphidObject aphidObject; aphidInterpreter = AphidInterpreterFactory.Create(); booleanExpression = BooleanExpressionFactory.Create((AphidExpressionContext)null, false, 0, 0); callExpression = CallExpressionFactory.Create ((AphidExpressionContext)null, (AphidExpression)booleanExpression, (List <AphidExpression>)null, 0, 0); aphidObject = this.CallStaticInteropFunction(aphidInterpreter, callExpression); }
public void Setup() { _factory = new BooleanExpressionFactory(); }