Compartir vía


RealProxy.GetTransparentProxy Método

Definición

Devuelve el proxy transparente para la instancia actual de RealProxy.

public:
 virtual System::Object ^ GetTransparentProxy();
public virtual object GetTransparentProxy ();
abstract member GetTransparentProxy : unit -> obj
override this.GetTransparentProxy : unit -> obj
Public Overridable Function GetTransparentProxy () As Object

Devoluciones

Devuelve el proxy transparente para la instancia actual del proxy.

Ejemplos

// 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() );
// 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());
' Create an instance of MyProxy.
Dim myProxyInstance As New MyProxy(GetType(CustomServer))
' Get a CustomServer proxy.
Dim myHelloServer As CustomServer = _
            CType(myProxyInstance.GetTransparentProxy(), CustomServer)
' Get stubdata.
Console.WriteLine("GetStubData = " + RealProxy.GetStubData(myProxyInstance).ToString())
' Get ProxyType.
Console.WriteLine("Type of object represented by RealProxy is :" + _
                                       myProxyInstance.GetProxiedType().ToString())

Se aplica a