共享收集数据合约
我有一些 WCF 服务,并将这些服务的数据契约分离到它们自己的程序集中。然后,我有一个引用数据契约程序集的服务客户端。
我已经打开了在引用的程序集中重用类型的选项。这有效,但不适用于集合。相反,代理生成器会生成自己的集合版本,即使该版本与我的数据契约程序集中的版本完全相同。
有什么方法可以告诉代理生成器重用我的数据契约程序集中定义的集合,而不是生成自己的冗余集合类型?
I have some WCF services and have separated out the data contracts for these services into their own assembly. I then have a client of the services that references the data contracts assembly.
I have turned on the option to Reuse types in referenced assemblies. This works, but not for collections. The proxy generator instead generates its own version of collections, even though that version is exactly the same as the one in my data contracts assembly.
Is there any way to tell the proxy generator to reuse the collections defined in my data contracts assembly rather than generating its own, redundant collection types?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您同时控制服务器和客户端,则不需要生成provy。
这个截屏中有很好的解释。
我们已停止使用生成的代理。与不断更新生成的代理以及在问题是有人忘记更新代理时进行调试相比,我们节省了数周的工作时间。
If you have controll of both the server and the client, you do not need to generate a provy.
There is a good explaination in this screencast.
We have stopped using generated proxies. We have saved weeks of work compared with continually having to update the generated proxies, and debugging when the problem was that someone forgot to update the proxy.