将 Moles 与 System.Reflection 结合使用

发布于 2024-10-09 11:37:23 字数 325 浏览 0 评论 0原文

我正在尝试监视方法 Assembly.GetEntryAssembly 但看起来 仅为 System.Reflection 命名空间生成存根类型,即 生成 System.Reflection.Moles.SAssembly,但不生成 System.Reflection.Moles.MAssembly。

我检查了另一个命名空间 System.Resource 具有存根和运行时摩尔类型,例如 System.Resources.Moles.SIResourceWriter 和 System.Resources.Moles.MResourceWriter 都可用。

任何有关这个具体问题的知识都会很棒。

I'm trying to mole the method Assembly.GetEntryAssembly but it appears that
only stub types are generated for the System.Reflection namespace i.e.
System.Reflection.Moles.SAssembly is generated but not System.Reflection.Moles.MAssembly.

I checked and another namespace System.Resource has both the stub and runtime mole types e.g. both System.Resources.Moles.SIResourceWriter and System.Resources.Moles.MResourceWriter are available.

Any knowledge about this specific issue would be great.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文