国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 學(xué)院 > 開(kāi)發(fā)設(shè)計(jì) > 正文

AOP在 .NET中的七種實(shí)現(xiàn)方法

2019-11-17 01:56:18
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

AOP在 .NET中的七種實(shí)現(xiàn)方法

7ApPRoaches for AOP in .Net

AOP在 .NET中的七種實(shí)現(xiàn)方法

Here are all the ways that I can think of to add AOPto your application. This mostly focus on the interception side of things,because once you have that, everything else it just details.

在這里列表了我想到的在你的應(yīng)用程序中加入AOP支持的所有方法。這里最主要的焦點(diǎn)是攔截,因?yàn)橐坏┯辛藬r截其它的事情都是細(xì)節(jié)。

Approach

方法

Advantages

優(yōu)點(diǎn)

Disadvantages

缺點(diǎn)

Remoting Proxies

遠(yuǎn)程代理

Easy to implement, because of the .Net framework support

容易實(shí)現(xiàn),因?yàn)橛?NET 框架的支持。

Somewhat heavy weightCan only be used on interfaces or MarshalByRefObjects

微顯重量級(jí)

僅在接口或 MarshalByRefObjects 上使用

Deriving from ContextBoundObject

從 ContextBoundObject 派生

Easiest to implementNative support for call interception

很容易實(shí)現(xiàn)

原生支持調(diào)用攔截

Very costly in terms of performance

非常昂貴的性能代價(jià)

Compile-time subclassing( Rhino Proxy )

編譯時(shí)子類化

Easiest to understand

很容易理解

Interfaces or virtual methods only

僅用于接口或虛方法

Runtime subclassing( Castle Dynamic Proxy )

運(yùn)行時(shí)子類化

Easiest to understandVery flexible

很容易理解

非常靈活

Complex implementation (but already exists)Interfaces or virtual methods only

復(fù)雜的實(shí)現(xiàn)(已經(jīng)實(shí)現(xiàn))

僅用于接口或虛方法

Hooking into the profiler API( Type Mock )

分析 API 鉤子

Extremely powerful

極端強(qiáng)大

Performance?Complex implementation (COM API, require separate runner, etc)

性能未知

復(fù)雜實(shí)現(xiàn)(COM API,需要單獨(dú)運(yùn)行等)

Compile time IL-weaving( Post Sharp / Cecil )

編譯時(shí) IL 織入

Very powerfulGood performance

非常強(qiáng)大

良好的性能

Very hard to implement

實(shí)現(xiàn)非常困難

Runtime IL-weaving( Post Sharp / Cecil )

運(yùn)行時(shí) IL 織入

Very powerfulGood performance

非常強(qiáng)大

良好的性能

Veryhard to implement

實(shí)現(xiàn)非常困難

文獻(xiàn)來(lái)源:http://ayende.com/blog/2615/7-approaches-for-aop-in-net


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 广西| 南开区| 五峰| 易门县| 平江县| 霍林郭勒市| 长兴县| 易门县| 启东市| 临夏市| 左权县| 弥渡县| 岱山县| 丁青县| 永泰县| 平南县| 彰化县| 扶余县| 台山市| 曲麻莱县| 呼伦贝尔市| 牡丹江市| 株洲市| 长沙县| 讷河市| 黑山县| 安平县| 延长县| 徐州市| 永州市| 桓仁| 绥宁县| 阜平县| 祁阳县| 新沂市| 集安市| 霸州市| 会理县| 贡山| 南川市| 兰考县|