【问题标题】:Calling GetType on service interface causes invoke?在服务接口上调用 GetType 会导致调用?
【发布时间】:2016-09-01 14:21:12
【问题描述】:

我有几个服务的非常基本的界面。做类似的事情:

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

在传入从 IService 继承的远程服务实例时,会触发 RealProxy Invoke 方法。

为什么?

【问题讨论】:

  • 为什么不这样做 - “当由 RealProxy 支持的透明代理被调用时,它会将调用委托给 Invoke 方法”

标签: c# wcf interface realproxy


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-14
    • 2020-01-11
    • 2020-05-17
    • 1970-01-01
    • 2020-11-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多