内置AOP在C#中 - 是它的方式是什么? [英] Built-in AOP in C# - is it on the way?
问题描述
在大型的应用程序,我发现自己真的很希望我已经内置AOP设施。由于它矗立在C#中最好的,你可以做的是工厂和RealProxys,PostSharp,ICorDebug,ICorProfiler或注入框架。有做AOP的没有干净的内置方式。
In large apps I find myself really wishing I had built-in AOP facilities. As it stands in C# the best you can do is factories and RealProxys, PostSharp, ICorDebug, ICorProfiler or injection frameworks. There is no clean built-in way of doing AOP.
有任何迹象显示任何地方(博客文章/内部讨论),表明AOP是在路上?
Is there any indication anywhere (blog post / internal discussion) that indicates that AOP is on the way?
推荐答案
罗曼的答复盖(几乎是完美的:)当前的解决方案。至于未来的支持,安德斯·海尔斯伯格拥有的 previously说的they'were在等待和放大器;见模式有关AOP。
Romain's answer covers (almost :) perfectly the current solutions. As for the future support, Anders Hejlsberg has previously stated that they'were in wait & see mode about AOP.
我们只能希望,与CSC的管理重写,以及«编译器作为服务»,人们可以插到编译器,并注入方面有。
We can only hope that with the managed rewrite of csc, and a «Compiler as a Service», one could plug into the compiler, and inject aspects there.
这篇关于内置AOP在C#中 - 是它的方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!