大衛·貝茨介紹他的文章如何不使用「添加服務引用」選項來創建參考WCF: http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2WCF不使用添加服務引用
一旦創建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接口),當我不使用「添加服務引用」 T o代理服務器?