Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft