lixiaojun
2024-05-15 e45eab5980c08520aee01a72224ccdfd12600543
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Microsoft.AspNetCore.Mvc.Filters;
 
namespace IStation.WebApi
{
 
    /// <summary>
    /// 结果筛选器
    /// </summary>
    public class ActionFilter : IAsyncActionFilter
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        /// <param name="next"></param>
        /// <returns></returns>
        public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
        {
            LogHelper.Info($"ActionFilter:{context.HttpContext.Request.Path}");
            await next();
        }
 
    }
}