Click or drag to resize
IPageRetrieverRetrieveAsyncTPageType Method (ActionDocumentQueryTPageType, ActionIPageCacheBuilderTPageType, NullableCancellationToken)
Asynchronously retrieves pages based on given parameters.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
Task<IEnumerable<TPageType>> RetrieveAsync<TPageType>(
	Action<DocumentQuery<TPageType>> applyQueryParametersAction = null,
	Action<IPageCacheBuilder<TPageType>> buildCacheAction = null,
	Nullable<CancellationToken> cancellationToken = null
)
where TPageType : new(), TreeNode

Parameters

applyQueryParametersAction (Optional)
Type: SystemActionDocumentQueryTPageType
Action to apply the query parameters to limit the set of retrieved pages.
buildCacheAction (Optional)
Type: SystemActionIPageCacheBuilderTPageType
Action to build cache configuration in case the result should be cached.
cancellationToken (Optional)
Type: SystemNullableCancellationToken
The cancellation instruction.

Type Parameters

TPageType
Type of the pages to be retrieved.

Return Value

Type: TaskIEnumerableTPageType
Remarks
Default parametrization is applied to reflect current site, culture and preview context. If cache is applied, current site name and culture code are included to the cache key automatically. If cache is applied, dependencies on pages included in the result as well as the page types are automatically configured.
See Also