国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 麟游县| 镇康县| 易门县| 溆浦县| 招远市| 益阳市| 合肥市| 万安县| 定南县| 个旧市| 开江县| 深州市| 上蔡县| 远安县| 江城| 芜湖县| 大安市| 长阳| 汾西县| 顺昌县| 农安县| 湖南省| 法库县| 班玛县| 金平| 呼和浩特市| 九寨沟县| 潞城市| 商水县| 宁阳县| 东乌珠穆沁旗| 洱源县| 凌云县| 通榆县| 三亚市| 兴国县| 句容市| 保靖县| 丰都县| 罗江县| 芜湖市|