public static Expression AnalyzeNewExpr(SymplNewExpr expr, AnalysisScope scope) { List <Expression> args = new List <Expression>(); args.Add(AnalyzeExpr(expr.Type, scope)); args.AddRange(expr.Arguments.Select(a => AnalyzeExpr(a, scope))); return(Expression.Dynamic( scope.GetRuntime().GetCreateInstanceBinder( new CallInfo(expr.Arguments.Length)), typeof(object), args )); }
public static Expression AnalyzeNewExpr(SymplNewExpr expr, AnalysisScope scope) { List<Expression> args = new List<Expression>(); args.Add(AnalyzeExpr(expr.Type, scope)); args.AddRange(expr.Arguments.Select(a => AnalyzeExpr(a, scope))); return Expression.Dynamic( scope.GetRuntime().GetCreateInstanceBinder( new CallInfo(expr.Arguments.Length)), typeof(object), args ); }