Esempio n. 1
0
 public static Expression AnalyzeUnaryExpr(SymplUnaryExpr expr,
                                           AnalysisScope scope)
 {
     if (expr.Operation == ExpressionType.Not)
     {
         return(Expression.Not(WrapBooleanTest(AnalyzeExpr(expr.Operand,
                                                           scope))));
     }
     // Example purposes only, we should never get here since we only have Not.
     return(Expression.Dynamic(
                scope.GetRuntime().GetUnaryOperationBinder(expr.Operation),
                typeof(object),
                AnalyzeExpr(expr.Operand, scope)
                ));
 }
Esempio n. 2
0
 public static Expression AnalyzeUnaryExpr(SymplUnaryExpr expr,
                                           AnalysisScope scope) {
     
     if (expr.Operation == ExpressionType.Not) {
         return Expression.Not(WrapBooleanTest(AnalyzeExpr(expr.Operand,
                                                            scope)));
     }
     // Example purposes only, we should never get here since we only have Not.
     return Expression.Dynamic(
         scope.GetRuntime().GetUnaryOperationBinder(expr.Operation),
         typeof(object),
         AnalyzeExpr(expr.Operand, scope)
     );
 }