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();
        }
예제 #3
0
        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();
        }