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 ResultFilter : IAsyncResultFilter
    {
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        /// <param name="next"></param>
        /// <returns></returns>
        public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next)
        {
            LogHelper.Info($"ResultFilter:{context.HttpContext.Request.Path}");
            await next();
        }
    }
}