public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { DisableQueryAttribute disableQueryAttribute = context.Controller.GetType().GetCustomAttribute <DisableQueryAttribute>(); _queryStringReader.ReadAll(disableQueryAttribute); await next(); }
/// <inheritdoc /> public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { ArgumentGuard.NotNull(context, nameof(context)); ArgumentGuard.NotNull(next, nameof(next)); if (context.HttpContext.IsJsonApiRequest()) { var disableQueryStringAttribute = context.Controller.GetType().GetCustomAttribute <DisableQueryStringAttribute>(); _queryStringReader.ReadAll(disableQueryStringAttribute); } await next(); }
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (next == null) { throw new ArgumentNullException(nameof(next)); } DisableQueryStringAttribute disableQueryStringAttribute = context.Controller.GetType().GetCustomAttribute <DisableQueryStringAttribute>(); _queryStringReader.ReadAll(disableQueryStringAttribute); await next(); }