任何成熟的AOP库在.NET领域使用? [英] Any mature AOP library to use in .Net world?

查看:201
本文介绍了任何成熟的AOP库在.NET领域使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

图书馆应比较AspectJ的至少任?

The library should at least compared to AspectJ, any?

推荐答案

您可以尝试各种IOC容器该产品采用AOP出包装盒(如 Spring.Net 具有强大的AOP freamework,温莎城堡拥有的拦截中也是这样的团结),使用捕捉与那些或使用IL-韦弗如 Postsharp

You can try out various IOC containers which feature AOP out of the box (e.g. Spring.Net has a powerful AOP freamework, Castle Windsor has Interceptors and so does Unity ), use Snap with those or use an IL-Weaver like Postsharp.

更新
我只是发现了关于再思考的 - 尽管在开发的早期阶段 - 看起来很有希望。它的目标是成为一个开源的替代Postsharp。

Update I just found out about "Afterthought" which - although early in the development - looks promising. It aims to be an OpenSource alternative to Postsharp.

和我忘了提及的 Mono.Cecil能做到它能够金正日编织,以及:

And I forgot to mention Mono.Cecil which is capable of il weaving as well:

在简单的英语,与塞西尔您可以加载现有的管理组件,浏览所有包含的类型,修改它们的飞行,并保存到磁盘修改后的装配。

In simple English, with Cecil, you can load existing managed assemblies, browse all the contained types, modify them on the fly and save back to the disk the modified assembly.

Fody 使用塞西尔为编织,并允许在构建阶段这一步整合。它配备了一些方便的加载项(如工具 INotifyPropertyChanged的或编译后生成公共属性的ToString 法)。

Fody uses Cecil to for weaving and allows to integrate that step in the build phase. It comes with some convenient addins (e.g. implements INotifyPropertyChanged or generates a ToString method from public properties after the compilation).

这篇关于任何成熟的AOP库在.NET领域使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆