TransparentProxy
Also see: Silverlight 2 Beta 1 Cross Domain Bug
One of
the recurring requests for a blog is related to TransparentProxy, RealProxy,
Contexts, Interception, etc. As
usual, I’m typing this where I don’t have access to our corporate network and
the sources, so some details might be a little off. (When will my dentist provide free
wireless to his customers?) And, as
usual, none of this is going to help you in developing applications. In fact, I postponed writing about this
topic – despite all the requests – because it seems so obscure. But if you are struggling through the
Rotor source base, it might explain some of the code that you see. I say ‘might’ because I’ve never
actually looked at the Rotor sources.
I’m just relying on the fact that they are a pretty faithful of a
cleansed snapshot of our desktop CLR sources. Anyway…
size=2>Normally, a reference to a managed object is just that: a native memory
pointer. This is reported
accurately to the GC so that we can track reachability and so we can update that
pointer if the object is relocated during a compaction. But in the case of an object that
derives from MarshalByRefObject (MBRO), it’s possible that the object instance
is actually remote. If this is the
case, a proxy stands in for the server instance.
