Based on this article: http://michaelbraude.com/2008/12/overriding-dispose-with-reflectionemit.html This might be an issue. Ensure there's tests there for this case, and if it's an issue, address...
If the given type (abstract or non-sealed) inherits from MarshalByRefObject, use the Remoting infrastructure to create a proxy. This will allow virtuals and non-virtuals to be hooked. Consider addi...
Change Proxy.Create() to take a List<> (or array) of interfaces. Create a proxy that implements all interface members (and handle collisions among the interfaces gracefully).
Self-explanatory. If Proxy.Create() gets an abstract type, create a proxy for it. Add before/after calls for abstract methods, but no-op the implementation in the proxy subclass (return the default...
Right now, the IInvocationHandler approach is not type-safe. That is, the arguments and return types are are declared as "object". Furthermore, the user may want to hook just a handful of methods. ...
Especially for IInvocationHandler - it's not at all clear what the bool return values should be.
I.e. I'm giving a Serializable type, how do I effectively implement that in the dynamic type? And if that's serialized, how (if it can) does it get deserialized into the base class type? Need to (p...
Self-explanatory :)
I don't think I'm being as aggressive as I can be with using "short form" opcodes. I need to review the emitting code to see if there's any places for this kind of optimization.
Since finalizers can be overriden, consider having the proxy override them if it sees them. I think I do this by default anyway, but I should investigate if this should continue to work this way, ...