Tuesday, July 15, 2003 ::: Transparent and Real Proxies:::
One of the most common questions I have faced is on why do you need two proxies, when you could do with one. Chris Brumme has as usual come up with an wonderful article on Proxies and how the CLR manages call to different kinds of objects. A must read...
The answer in 1 para is :
The TP is pure magic. Its job is to fool all the CLR code that performs casting, field access, method dispatch, etc. into thinking that it’s dealing with a local instance of the appropriate type. In contrast, the RP has absolutely no magic. Its job is to provide an extensibility point where we can define RemotingProxy, or YourOwnProtocolProxy. It simply isn’t possible for us to combine magic with extensibility on the same object, as we shall see.