mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
22 lines
604 B
C#
22 lines
604 B
C#
using Castle.DynamicProxy;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Yi.Framework.WebCore.Utility
|
|
{
|
|
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}执行完成了");
|
|
}
|
|
}
|
|
}
|