We were able to get this to work, but Reflection isn't very compatible with NET app protection and we ran into grief because the calling app needs to know quite a lot about the code you're about to run so it can cast and send/receive the correct values, so complexity seems to rise logarithmically with flexibility.
E.g. if you want dynamic code to optionally act on one of several resultsets or perform customer-specific manipulations, won't you need to pass multiple extraneous parameters to your generic routine every time to be sure the dynamic code gets what it needs, and then process an equally complex set of results to allow for every potential action? There's also the issue of dependencies if the code truly can be dynamic.
Obviously all this will be OK if the dynamic code has a relatively limited set of actions and possibly we misunderstood anyway, in which case I'd be keen to revisit.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1