54 lines
1.9 KiB
C#
54 lines
1.9 KiB
C#
using APT.Infrastructure.Core;
|
|
using Microsoft.AspNetCore.Mvc.Filters;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace APT.Infrastructure.Api.WebFilters
|
|
{
|
|
|
|
//public class WebApiTrackerAttribute : System.Web.Http.Filters.ActionFilterAttribute
|
|
//{
|
|
// public bool AllowMultiple => true;
|
|
|
|
// //public Task<HttpResponseMessage> ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
|
|
// //{
|
|
// // throw new NotImplementedException();
|
|
// //}
|
|
|
|
// //public Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
|
|
// //{
|
|
// // throw new NotImplementedException();
|
|
// // var s = 1;
|
|
// //}
|
|
|
|
// public override void OnActionExecuting(HttpActionContext actionContext)
|
|
// {
|
|
// LoggerManager.GetLogger().Info("11111111111");
|
|
// base.OnActionExecuting(actionContext);
|
|
// }
|
|
|
|
// public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
|
|
// {
|
|
// LoggerManager.GetLogger().Info("2222222222222");
|
|
// base.OnActionExecuted(actionExecutedContext);
|
|
// }
|
|
|
|
// public override Task OnActionExecutingAsync(HttpActionContext actionContext, CancellationToken cancellationToken)
|
|
// {
|
|
// LoggerManager.GetLogger().Info("2222222222222");
|
|
// return base.OnActionExecutingAsync(actionContext, cancellationToken);
|
|
// }
|
|
|
|
// public override Task OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
|
|
// {
|
|
// LoggerManager.GetLogger().Info("11111111111");
|
|
// return base.OnActionExecutedAsync(actionExecutedContext, cancellationToken);
|
|
// }
|
|
|
|
//}
|
|
} |