
C#类库/AOP
AOP的封装
愚公搬代码
《头衔》:华为云特约编辑,华为云云享专家,华为开发者专家,华为产品云测专家,CSDN博客专家,CSDN商业化专家,阿里云专家博主,阿里云签约作者,腾讯云优秀博主,腾讯云内容共创官,掘金优秀博主,亚马逊技领云博主,51CTO博客专家等。
《近期荣誉》:2022年度博客之星TOP2,2023年度博客之星TOP2,2022年华为云十佳博主,2023年华为云十佳博主,2024年华为云十佳博主等。
《博客内容》:.NET、Java、Python、Go、Node、前端、IOS、Android、鸿蒙、Linux、物联网、网络安全、大数据、人工智能、U3D游戏、小程序等相关领域知识。
展开
-
(精华)2020年6月27日 C#类库 TransactionalAttribute(Castle-AOP的封装)
using EFCore.Sharding; using Microsoft.Extensions.DependencyInjection; using System; using System.Data; using System.Linq; using System.Threading.Tasks; namespace Core.Util { /// <summary> /// 使用事务包裹 /// </summary> public class原创 2020-06-27 16:48:54 · 565782 阅读 · 1 评论 -
(精华)2020年6月27日 C#类库 CastleInterceptor(Castle-AOP的封装)
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Castle.DynamicProxy; namespace Core.Util { internal class CastleInterceptor : AsyncInterceptorBase { private readonly IServiceProvider _原创 2020-06-27 16:45:47 · 565523 阅读 · 1 评论 -
(精华)2020年6月27日 C#类库 IAOPContext(Castle-AOP的封装)
using System; using System.Reflection; namespace Core.Util { public interface IAOPContext { IServiceProvider ServiceProvider { get; } object[] Arguments { get; } Type[] GenericArguments { get; } MethodInfo Method {原创 2020-06-27 16:44:51 · 564835 阅读 · 0 评论 -
(精华)2020年6月27日 C#类库 CastleAOPContext(Castle-AOP的封装)
using Castle.DynamicProxy; using System; using System.Reflection; namespace Core.Util { public class CastleAOPContext : IAOPContext { private readonly IInvocation _invocation; public CastleAOPContext(IInvocation invocation, IServic原创 2020-06-27 16:40:16 · 564895 阅读 · 0 评论 -
(精华)2020年6月27日 C#类库 BaseAOPAttribute(Castle-AOP的封装)
using System; using System.Threading.Tasks; namespace Core.Util { /// <summary> /// AOP基类 /// 注:不支持控制器,需要定义接口并实现接口,自定义AOP特性放到接口实现类上 /// </summary> public abstract class BaseAOPAttribute : Attribute { public virt原创 2020-06-27 16:39:34 · 565163 阅读 · 1 评论