2017年8月26日

摘要: 意图:为了是客户端代理呈现出面向对象的多态的特征 a. 服务端 1.契约 实现了契约的继承这个在服务端是一点问题没有,因为oprationcontract可以继承,虽然DataContract不能实现继承,注意IAnimal和IDog都是契约,但是我们通常喜欢用最 具体的那个契约来发布服务,因为他最丰富 using System; using System.ServiceModel; name... 阅读全文
posted @ 2017-08-26 21:58 听哥哥的话 阅读(180) 评论(0) 推荐(0)
摘要: a. 服务端 1.契约 使用了继承 using System; using System.ServiceModel; namespace WCF.Chapter2.InheritanceReworked.Host { [ServiceContract] public interface IHuman { [OperationContract] ... 阅读全文
posted @ 2017-08-26 21:37 听哥哥的话 阅读(181) 评论(0) 推荐(0)
摘要: a. 服务端 1.服务端 契约用OperationContract的Name实现重载 using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; n... 阅读全文
posted @ 2017-08-26 21:16 听哥哥的话 阅读(133) 评论(0) 推荐(0)

导航