使用 Rhino Mocks 删除显式实现接口的方法

发布于 2024-08-31 17:27:53 字数 90 浏览 4 评论 0原文

如何使用 Rhino Mocks 删除显式实现接口的方法?

据我了解,Rhino Mocks 要求存根方法是虚拟的,并且显式实现的接口成员不是虚拟的。

How can I stub out methods that explicitly implement an interface using Rhino Mocks?

As I understand it, Rhino Mocks requires stubbed out methods to be virtual, and explicitly implemented interface members are not virtual.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

白馒头 2024-09-07 17:27:53

目前还没有。 接口成员的功能昨天刚刚在动态代理代码中得到修复(Rhino Mocks 在幕后使用动态代理来拦截方法调用):

事实上,拦截显式实现的 org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-107" rel="nofollow noreferrer">http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-107

Not currently. In fact, the feature of intercepting explicitly implemented interface members just got fixed yesterday in the Dynamic Proxy code (Rhino Mocks uses Dynamic Proxy under-the-covers to intercept method calls):

http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-107

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