【发布时间】:2010-12-09 16:20:17
【问题描述】:
David Betz 在他的文章中描述了如何在不使用“添加服务引用”选项的情况下创建对 WCF 的引用: http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2
创建 WCF 服务后,silverlight 中的语句如下:
BasicHttpBinding basicHttpBinding = new BasicHttpBinding();
EndpointAddress endpointAddress = new EndpointAddress("http://localhost:1003/Person.svc");
IPersonService personService = new ChannelFactory<IPersonService>(basicHttpBinding, endpointAddress).CreateChannel();
...
当我不使用“添加服务引用”来构建代理时,如何从 Silverlight 引用 WCF 中创建的类型(例如 IPersonService 接口)?
【问题讨论】:
标签: silverlight wcf