为什么 ServiceBehavior 是服务类的属性而不是契约的属性?
我发现很多地方人们都指出 ServiceBehavior 应该是服务类的属性而不是契约,而且情况似乎确实如此。这是为什么呢?
I've found plenty of places where people point out that a ServiceBehavior should be an attribute of the service class and not the contract, and this definitely seems to be the case. Why is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为它涉及服务的实施细节,并且不是合同的一部分。
会话、重新进入等行为都与实现有关,以便您可以拥有相同的契约(接口),但在不同的端点上公开不同的实现。
Because it deals with implementation detail of the service and is not part of the contract.
Behaviours such as session, re-entry,... all deal with the implementation so that you could have the same contract (interface) but different implementations exposed at different endpoints.