C# 中的内置 AOP - 正在开发中吗? [英] Built-in AOP in C# - is it on the way?

查看:26
本文介绍了C# 中的内置 AOP - 正在开发中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大型应用程序中,我发现自己真的希望我有内置的 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?

推荐答案

Romain 的回答(几乎:)完美地涵盖了当前的解决方案.至于未来的支持,Anders Hejlsberg之前表示 他们正在等待 &请参阅有关 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.

这篇关于C# 中的内置 AOP - 正在开发中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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