Loading

.net core 的 aop 实现方法汇总

decorator

不借助第三方DI容器,通过装饰模式通过内置的DI容器实现
https://medium.com/@willie.tetlow/net-core-dependency-injection-decorator-workaround-664cd3ec1246

autofac

autofac借助castle.core的动态代理实现
https://autofac.readthedocs.io/en/latest/advanced/interceptors.html

simple injector

si借助拓展实现
https://simpleinjector.readthedocs.io/en/latest/aop.html

aspect core

园子里竹韵悠扬丶提供的aop方案
https://www.cnblogs.com/liuhaoyang/p/aspectcore-introduction-1.html

dora

园子里蒋金楠提供的aop方案
https://www.cnblogs.com/artech/p/dora-initerception.html
https://www.cnblogs.com/artech/p/dora-interception-01.html

simpleproxy

也是借助castle.core实现的简易aop方案
https://github.com/f135ta/SimpleProxy

asp.net core + castle.core

asp.net core使用原生castle.core
https://blog.zhaytam.com/2020/08/18/aspnetcore-dynamic-proxies-for-aop/

参考:
https://stackoverflow.com/a/51785089/7726468

拓展阅读:
https://www.cnblogs.com/wswind/p/aop_in_dotnet.html

posted @ 2019-10-31 09:45  wswind  阅读(1634)  评论(0编辑  收藏  举报