Interface IQueryPerformer
- Namespace
- Cratis.Applications.Queries
- Assembly
- Cratis.Applications.dll
Defines a renderer that can render a query.
public interface IQueryPerformer- Extension Methods
Properties
Dependencies
Gets the dependencies required by the renderer.
IEnumerable<Type> Dependencies { get; }Property Value
FullyQualifiedName
Gets the fully qualified name of the query the performer can perform.
FullyQualifiedQueryName FullyQualifiedName { get; }Property Value
Location
Gets the location the query is at.
IEnumerable<string> Location { get; }Property Value
Remarks
This is used to determine which renderer should render a given query based on its location.
Name
Gets the name of the query the performer can perform.
QueryName Name { get; }Property Value
Parameters
Gets the query parameters for the performer.
QueryParameters Parameters { get; }Property Value
Remarks
This includes parameters that are not dependencies, typically those that come from query string or request parameters.
ReadModelType
Gets the type of read model the query performer is for.
Type ReadModelType { get; }Property Value
Type
Gets the type of the query performer.
Type Type { get; }Property Value
Methods
IsAuthorized(QueryContext)
Checks if the current user is authorized to perform this query.
bool IsAuthorized(QueryContext context)Parameters
- contextQueryContext
- The context for the query. 
Returns
- bool
- True if authorized, false if unauthorized. 
Perform(QueryContext)
Renders the given query.
ValueTask<object?> Perform(QueryContext context)Parameters
- contextQueryContext
- The context for the query to render.