RealProxy.GetTransparentProxy Method ()

 

Returns the transparent proxy for the current instance of RealProxy.

Namespace:   System.Runtime.Remoting.Proxies
Assembly:  mscorlib (in mscorlib.dll)

public virtual object GetTransparentProxy()

Return Value

Type: System.Object

The transparent proxy for the current proxy instance.

// Create an instance of MyProxy.
MyProxy myProxyInstance = new MyProxy(typeof(CustomServer));
// Get a CustomServer proxy.
CustomServer myHelloServer = (CustomServer)myProxyInstance.GetTransparentProxy();
// Get stubdata.
Console.WriteLine("GetStubData = " + RealProxy.GetStubData(myProxyInstance).ToString()); 
// Get ProxyType.
Console.WriteLine("Type of object represented by RealProxy is :" 
                  + myProxyInstance.GetProxiedType());

.NET Framework
Available since 1.1
Return to top
Show: