using System.Reflection;
using AspectInjector.Broker;
using DispenserCommon.Utils;
using Serilog;
namespace DispenserCommon.Aop;
[Aspect(Scope.Global)]
[AttributeUsage(AttributeTargets.Class)]
[Injection(typeof(GlobalTry), Inherited = true)]
public class GlobalTry : Attribute
{
///
/// 通过AOP实现方法执行前后的时间消耗
///
///
///
///
///
///
[Advice(Kind.Around, Targets = Target.Method)]
public object? HandleMethod([Argument(Source.Name)] string name,
[Argument(Source.Arguments)] object[] args,
[Argument(Source.Target)] Func