【发布时间】:2012-03-02 06:01:48
【问题描述】:
Svcutil 生成的代理是否比运行时使用的 ChannelFactory 提供更好的性能? ChannelFactory 是否默认缓存代理?
我将 .NET 4 与一项服务一起使用,该服务有 100 多个操作和 500 多个参与其中的数据合约。
当我使用ChannelFactory<T> 时,需要很长时间才能将代理返回给我。有人能建议哪种方法是创建代理的最佳方式吗?
我的代码如下所示:
EndpointAddress endPoint = new EndpointAddress(url);
// My own API which gives the custom binding I create programatically
CustomBinding binding = BindingFactory.GetCustomBinding("WSECustomBinding");
ChannelFactory<T> factory = new ChannelFactory<T>(binding, endPoint);
【问题讨论】:
标签: wcf svcutil.exe channelfactory performance