mirror of https://github.com/Squidex/squidex.git
3 changed files with 38 additions and 1 deletions
@ -0,0 +1,32 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc.Filters; |
|||
using Squidex.Infrastructure.Log; |
|||
|
|||
namespace Squidex.Pipeline |
|||
{ |
|||
public sealed class MeasureResultFilter : IAsyncResultFilter, IAsyncActionFilter |
|||
{ |
|||
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) |
|||
{ |
|||
using (Profiler.Trace("ExecuteAction")) |
|||
{ |
|||
await next(); |
|||
} |
|||
} |
|||
|
|||
public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next) |
|||
{ |
|||
using (Profiler.Trace("ExecuteResult")) |
|||
{ |
|||
await next(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue