public static MethodFactory.MethodCall CompileBoxedMethodCall(MethodInfo method) { MethodFactory.ExpressionArgsPair methodCallExpressions = MethodFactory.GetMethodCallExpressions(method); return(Expression.Lambda <MethodFactory.MethodCall>((Expression)Expression.Convert(methodCallExpressions.Expression, typeof(object)), methodCallExpressions.Parameters).Compile()); }
public static MethodFactory.MethodCall CompileMethodCall(MethodInfo method) { MethodFactory.ExpressionArgsPair methodCallExpressions = MethodFactory.GetMethodCallExpressions(method); return(Expression.Lambda <MethodFactory.MethodCall>(methodCallExpressions.Expression, methodCallExpressions.Parameters).Compile()); }