public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { if (Configuration.AuditDisabled || (_logDisabledBuilder != null && _logDisabledBuilder.Invoke(context))) { await next.Invoke(); return; } await _adapter.BeforeExecutingAsync(context, IncludeHeaders(context), IncludeRequestBody(context), _serializeActionParameters, EventTypeName(context)); var actionExecutedContext = await next.Invoke(); await _adapter.AfterExecutedAsync(actionExecutedContext, IncludeModelState(actionExecutedContext), IncludeResponseBody(actionExecutedContext)); }
public override async Task OnActionExecutingAsync(HttpActionContext actionContext, CancellationToken cancellationToken) { if (Configuration.AuditDisabled || _adapter.IsActionIgnored(actionContext)) { return; } await _adapter.BeforeExecutingAsync(actionContext, GetContextWrapper(actionContext.Request), IncludeHeaders, IncludeRequestBody, SerializeActionParameters, EventTypeName); }
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { if (Configuration.AuditDisabled || _adapter.ActionIgnored(context)) { await next.Invoke(); return; } await _adapter.BeforeExecutingAsync(context, IncludeHeaders, IncludeRequestBody, SerializeActionParameters, EventTypeName); var actionExecutedContext = await next.Invoke(); await _adapter.AfterExecutedAsync(actionExecutedContext, IncludeModelState, ShouldIncludeResponseBody(actionExecutedContext), IncludeResponseHeaders); }