Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有几个服务的非常基本的界面。做类似的事情:
private static void Test(IService svc) { var test = svc.GetType(); }
在传入从 IService 继承的远程服务实例时,会触发 RealProxy Invoke 方法。
为什么?
正如 stuartd 所指出的,这是预期的行为。
https://msdn.microsoft.com/en-us/library/system.runtime.remoting.proxies.realproxy.invoke(v=vs.110).aspx