有关为WCF创建服务客户端代理的问题 [英] Question on creating service client proxy for WCF

查看:85
本文介绍了有关为WCF创建服务客户端代理的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我一直在使用WCF创建客户端/服务应用程序,并且正在测试以下文章中的示例

Windows Communication Foundation(WCF)概述 [ ^ ]



我的问题是在使用WCF客户端标题下,有代码创建客户端服务代理 - 这是为我创建的,还是我必须把它放在我的一个类中,如果有的话?



谢谢

Caroline

Hi,
I have been creating a client/service application using WCF, and was testing the example in the following article
A Windows Communication Foundation (WCF) Overview[^]

My question is under the heading ''Using the WCF client'', there is code that creates the client service proxy - is this created for me, or do I have to put this in one of my classes, and if so where?

Thanks
Caroline

推荐答案

如前所述添加服务说明参考,代理类应该自动包含在你的内容中。



你可以手动生成类(在这种情况下,我通常会创建一个库项目来将生成的代码复制到,然后我引用dll),但上面的优点是保持服务中的更改与代理同步。当它工作时;)
As the instructions previously added a service reference, the proxy classes should be automatically included for you.

You can generate the classes manually (in which case I normally create a library project to copy the generated code into, then I reference the dll), but the above has the advantage of keeping changes in the service in sync with the proxies. When it is working ;)


这篇关于有关为WCF创建服务客户端代理的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆