using Microsoft.AspNetCore.Mvc.Filters; namespace HStation.WebApi { /// /// 结果筛选器 /// public class ResultFilter : IAsyncResultFilter { /// /// /// /// /// /// public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next) { //执行顺序 6 线程8 //var threadId = Thread.CurrentThread.ManagedThreadId; //LogHelper.Debug($"结果筛选器,线程:{threadId}"); //LogHelper.Info($"ResultFilter:{context.HttpContext.Request.Path}"); await next(); } } }