using AspectInjector.Broker;
using DispenserCommon.DTO;
using DispenserCommon.Enums;
using DispenserCommon.Events;
using DispenserCommon.Utils;
using DispenserUI.Exceptions;
using Serilog;
namespace DispenserCommon.Aop;
[Aspect(Scope.Global)]
[Injection(typeof(Operation))]
public class Operation(string name) : Attribute
{
public string Name { get; set; } = name;
public Operation() : this("")
{
Name = "";
}
///
/// 通过AOP实现方法执行过程拦截
///
///
///
///
///
[Advice(Kind.Around, Targets = Target.Method)]
public object? Around(
[Argument(Source.Arguments)] object[] args,
[Argument(Source.Target)] Func