0

I have a very basic interface for several services. Doing something like:

private static void Test(IService svc)
{
     var test = svc.GetType();
}

while passing in an instance of a remote service that inherits from IService causes the RealProxy Invoke method to be fired.

Why?

Shawn
  • 2,356
  • 6
  • 48
  • 82
  • 1
    Why would it not - _"When the transparent proxy that is backed by the RealProxy is called, it delegates the calls to the Invoke method"_ – stuartd Sep 01 '16 at 14:35

1 Answers1

0

As pointed out by stuartd this is expected behavior.

https://msdn.microsoft.com/en-us/library/system.runtime.remoting.proxies.realproxy.invoke(v=vs.110).aspx

Shawn
  • 2,356
  • 6
  • 48
  • 82