Interface IContentQueryExecutor
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Defines methods to execute the content items query.
public interface IContentQueryExecutor
- Extension Methods
Methods
GetResult<TModel>(ContentItemQueryBuilder, Func<IContentQueryDataContainer, Task<TModel>>, ContentQueryExecutionOptions, CancellationToken)
Executes the content items query.
Task<IEnumerable<TModel>> GetResult<TModel>(ContentItemQueryBuilder builder, Func<IContentQueryDataContainer, Task<TModel>> resultSelector, ContentQueryExecutionOptions options = null, CancellationToken cancellationToken = default)
Parameters
builder
ContentItemQueryBuilderThe content item queries builder.
resultSelector
Func<IContentQueryDataContainer, Task<TModel>>Function asynchronously converting a content query data record container to the resulting
TModel
instance.options
ContentQueryExecutionOptionsOptions object for configuration of query execution.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<IEnumerable<TModel>>
Type Parameters
TModel
Type of the selected result.
Exceptions
- ArgumentNullException
Thrown when
builder
orresultSelector
is null.
GetResult<TModel>(ContentItemQueryBuilder, Func<IContentQueryDataContainer, TModel>, ContentQueryExecutionOptions, CancellationToken)
Executes the content items query.
Task<IEnumerable<TModel>> GetResult<TModel>(ContentItemQueryBuilder builder, Func<IContentQueryDataContainer, TModel> resultSelector, ContentQueryExecutionOptions options = null, CancellationToken cancellationToken = default)
Parameters
builder
ContentItemQueryBuilderThe content item queries builder.
resultSelector
Func<IContentQueryDataContainer, TModel>Function converting a content query data record container to the resulting
TModel
instance.options
ContentQueryExecutionOptionsOptions object for configuration of query execution.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<IEnumerable<TModel>>
Type Parameters
TModel
Type of the selected result.
Exceptions
- ArgumentNullException
Thrown when
builder
orresultSelector
is null.