将 Moles 与 System.Reflection 结合使用
我正在尝试监视方法 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是不可能的。请参阅 http://social .msdn.microsoft.com/Forums/en-US/pex/thread/c262d8f1-246e-4157-a7b4-f7ddeaf1890c/ 了解详细信息。
It's not possible. See http://social.msdn.microsoft.com/Forums/en-US/pex/thread/c262d8f1-246e-4157-a7b4-f7ddeaf1890c/ for details.