Class QueryActionFilter
- Namespace
- Cratis.Applications.Queries
- Assembly
- Cratis.Applications.dll
Represents a IAsyncActionFilter for providing a proper QueryResult<T> for post actions.
public class QueryActionFilter : IAsyncActionFilter, IFilterMetadata
- Inheritance
-
QueryActionFilter
- Implements
- Inherited Members
Remarks
Initializes a new instance of the QueryActionFilter class.
Constructors
QueryActionFilter(IOptions<JsonOptions>, IQueryContextManager, IQueryProviders, ILogger<QueryActionFilter>)
Represents a IAsyncActionFilter for providing a proper QueryResult<T> for post actions.
public QueryActionFilter(IOptions<JsonOptions> options, IQueryContextManager queryContextManager, IQueryProviders queryProviders, ILogger<QueryActionFilter> logger)
Parameters
options
IOptions<JsonOptions>queryContextManager
IQueryContextManagerqueryProviders
IQueryProviderslogger
ILogger<QueryActionFilter>ILogger for logging.
Remarks
Initializes a new instance of the QueryActionFilter class.
Fields
PageQueryStringKey
Gets the key for the page query string.
public const string PageQueryStringKey = "page"
Field Value
PageSizeQueryStringKey
Gets the key for the page size query string.
public const string PageSizeQueryStringKey = "pageSize"
Field Value
SortByQueryStringKey
Gets the key for the sort by query string.
public const string SortByQueryStringKey = "sortby"
Field Value
SortDirectionQueryStringKey
Gets the key for the sort direction query string.
public const string SortDirectionQueryStringKey = "sortDirection"
Field Value
Methods
OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)
Called asynchronously before the action, after model binding is complete.
public Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
Parameters
context
ActionExecutingContextnext
ActionExecutionDelegateThe ActionExecutionDelegate. Invoked to execute the next action filter or the action itself.