Table of Contents

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 ContentItemQueryBuilder

The content item queries builder.

resultSelector Func<IContentQueryDataContainer, Task<TModel>>

Function asynchronously converting a content query data record container to the resulting TModel instance.

options ContentQueryExecutionOptions

Options object for configuration of query execution.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task<IEnumerable<TModel>>

Type Parameters

TModel

Type of the selected result.

Exceptions

ArgumentNullException

Thrown when builder or resultSelector 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 ContentItemQueryBuilder

The content item queries builder.

resultSelector Func<IContentQueryDataContainer, TModel>

Function converting a content query data record container to the resulting TModel instance.

options ContentQueryExecutionOptions

Options object for configuration of query execution.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task<IEnumerable<TModel>>

Type Parameters

TModel

Type of the selected result.

Exceptions

ArgumentNullException

Thrown when builder or resultSelector is null.