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 = gcnew MyProxy( CustomServer::typeid );

// Get a CustomServer proxy.
CustomServer^ myHelloServer = static_cast<CustomServer^>(myProxyInstance->GetTransparentProxy());

// Get stubdata.
Console::WriteLine( "GetStubData = {0}", RealProxy::GetStubData( myProxyInstance ) );

// Get ProxyType.
Console::WriteLine( "Type of object represented by RealProxy is : {0}", myProxyInstance->GetProxiedType() );

.NET Framework
Available since 1.1
Return to top
Show: