This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Proxy Programming Tasks
Determining if an object is actually a proxy
public class SomeClass
{
//. . .
public void ProxyCheck(Object obj)
{
if (RemotingServices.IsTransparentProxy(obj) == true)
Console.WriteLine("Is a proxy");
else
Console.WriteLine("Is not a proxy ");
}
//. . .
}
Obtaining the RealProxy from a Proxy
public class SomeClass
{
//. . .
public void ObtainRealProxy (Object obj)
{
RealProxy realProxy = RemotingServices.GetRealProxy(
obj);
//. . .
}