为什么 ServiceBehavior 是服务类的属性而不是契约的属性?

发布于 2024-10-01 10:47:58 字数 69 浏览 6 评论 0原文

我发现很多地方人们都指出 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可爱暴击 2024-10-08 10:47:58

因为它涉及服务的实施细节,并且不是合同的一部分

会话、重新进入等行为都与实现有关,以便您可以拥有相同的契约(接口),但在不同的端点上公开不同的实现。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文