Class QueryPipeline
- Namespace
- Cratis.Arc.Queries
- Assembly
- Cratis.Arc.Core.dll
Represents a query pipeline.
public class QueryPipeline : IQueryPipeline
- Inheritance
-
QueryPipeline
- Implements
- Inherited Members
- Extension Methods
Constructors
QueryPipeline(ICorrelationIdAccessor, IQueryContextManager, IQueryFilters, IQueryPerformerProviders, IQueryRenderers, IReadModelInterceptors, IDiscoverableValidators, IActivitySource<QueryPipeline>)
Represents a query pipeline.
public QueryPipeline(ICorrelationIdAccessor correlationIdAccessor, IQueryContextManager queryContextManager, IQueryFilters queryFilters, IQueryPerformerProviders queryPerformerProviders, IQueryRenderers queryRenderers, IReadModelInterceptors readModelInterceptors, IDiscoverableValidators discoverableValidators, IActivitySource<QueryPipeline> activitySource)
Parameters
correlationIdAccessorICorrelationIdAccessorAccessor for the current correlation ID.
queryContextManagerIQueryContextManagerManages the current query context.
queryFiltersIQueryFiltersThe query filters.
queryPerformerProvidersIQueryPerformerProvidersThe query performer providers.
queryRenderersIQueryRenderersThe query renderers.
readModelInterceptorsIReadModelInterceptorsThe IReadModelInterceptors for intercepting read models.
discoverableValidatorsIDiscoverableValidatorsThe IDiscoverableValidators for validating paging and sorting.
activitySourceIActivitySource<QueryPipeline>The IActivitySource<T> for tracing.
Methods
Perform(FullyQualifiedQueryName, QueryArguments, Paging, Sorting, IServiceProvider, CancellationToken)
Performs the given query.
public Task<QueryResult> Perform(FullyQualifiedQueryName queryName, QueryArguments arguments, Paging paging, Sorting sorting, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)
Parameters
queryNameFullyQualifiedQueryNameThe name of the query to perform.
argumentsQueryArgumentsThe arguments for the query.
pagingPagingThe paging to apply to the query.
sortingSortingThe sorting to apply to the query.
serviceProviderIServiceProviderThe IServiceProvider scoped to the current request, used to resolve dependencies.
cancellationTokenCancellationTokenThe CancellationToken for cancelling the query.
Returns
- Task<QueryResult>
A QueryResult representing the result of executing the command.