realproxy

Ref argument through a RealProxy

I need to call a method with ref-arguments through a RealProxy. I have isolated the problem down to the following code: using System; using System.Reflection; using System.Runtime.Remoting.Messaging; using System.Runtime.Remoting.Proxies; namespace ConsoleApplication1 { class Program { static void Main(string[] args) ...

How to get the RealProxy when I know only the transparent proxy.

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 you return an object as the return value through a RealProxy transparent proxy?

I'm working up a system where I plan on using RealProxy objects to enable intercepting method calls against a set of objects, handling the call, and then returning appropriate results. This works just find for simple return types like strings or ints, but I can't seem to return objects from the RealProxy.Invoke method. Everything works...

C# RealProxy: generic methods?

I'm trying to handle a call of a generic method through a RealProxy, but I cannot seem to find the information about the actual type of the generic parameter used in the intercepted method call. An excerpt of the code: public override IMessage Invoke(IMessage msg) { ... string methodName = (string)msg.Properties[...