使用什么二进制重写器来实现 Microsoft 的代码契约?

发布于 2024-08-03 22:44:46 字数 206 浏览 9 评论 0原文

我说的是那些最终会出现在 .NET 中的代码契约 4.0。他们使用什么二进制重写器来注入使其全部工作的代码,并且它是否公开可用?我希望这不仅仅是一个编译器的问题,因为我希望能够使用他们的 AOP 二进制重写器。

I am talking about those Code Contracts that will end up in .NET 4.0. What binary rewriter do they use to inject the code that makes it all work and is it publicly available? I hope it's not just a compiler thing because I would love to be able to use their binary rewriter for AOP.

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

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

发布评论

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

评论(1

岛歌少女 2024-08-10 22:44:46

如果您想编写自己的 AOP 或修改 IL 的任何其他内容,您可能需要查看 MS Research 的通用编译器基础结构 Codeplex 上的项目。它是一个包含非常出色的工具的开源包,提供 IL 读取器和 IL 编写器实现。

Jason Bock 还发表了一系列有关使用 CCI 进行代码注入 很好地概述了如何使用工具实现 AOP 风格的程序集修改。

If you want to write your own AOP, or anything else that modifies IL you may want to look at MS Research's Common Compiler Infrastructure project on Codeplex . It is an open source bag of really great tools that provides both an IL reader and IL writer implementation.

Jason Bock also has a series of blog posts on Code Injection With CCI that give a good overview of implementing an AOP style assembly modification with the tools.

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