views:

38

answers:

1

I have a transparent proxy, for instance one generated by WCF:

        ChannelFactory<ICalculator> channelFactory = 
            new ChannelFactory<ICalculator>(
              new NetNamedPipeBinding(),
              "net.pipe://localhost/WcfTransparentProxy/Calculator" );
        ICalculator calculator = channelFactory.CreateChannel();

How do I get the RealProxy from the transparent proxy?

+2  A: 

There's a function in RemotingServices specifically for this:

System.Runtime.Remoting.RemotingServices.GetRealProxy( transparentProxy );

John Gibb
Thank you! That's what I was looking for.
Gael Fraiteur