Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
beta 1
-
None
Description
CLI's Proxies are a bit different from Java proxies. Proxiable objects need to extends MarshalByRefObject or ContextBoundObject. Proxy definition goes through attributes.
This proposal is to create a component that emits the necessary IL to generate a proxy for a set of interfaces and uses a invocation handler implementation to dispatch methods.
Something like:
object myproxy = DynamicProxy.create( new Type[]
{ typeof(interface1) }, new InvoHandlerImpl());
// At this point myproxy implements interface1 and will dispatch
// method invocation to InvoHandlerImpl
Seems simple but will use reflection.emit to generate IL code, and this is like writing ASM