2021-10-13 15:40:56 +08:00
|
|
|
|
using Castle.DynamicProxy;
|
|
|
|
|
|
using System;
|
2021-10-12 16:52:28 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
2021-10-17 18:37:07 +08:00
|
|
|
|
namespace Yi.Framework.WebCore.Utility
|
2021-10-12 16:52:28 +08:00
|
|
|
|
{
|
|
|
|
|
|
public class CustomAutofacAop : IInterceptor
|
|
|
|
|
|
{
|
|
|
|
|
|
public void Intercept(IInvocation invocation)
|
|
|
|
|
|
{
|
|
|
|
|
|
Console.WriteLine($"invocation.Methond={invocation.Method}");
|
|
|
|
|
|
Console.WriteLine($"invocation.Arguments={string.Join(",", invocation.Arguments)}");
|
|
|
|
|
|
|
|
|
|
|
|
invocation.Proceed(); //继续执行
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"方法{invocation.Method}执行完成了");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|