Interface IContentItemAssetRetriever
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Interface to retrieve content item asset data.
public interface IContentItemAssetRetriever
- Extension Methods
Methods
Retrieve(IContentQueryDataContainer, string, CancellationToken)
Retrieves content item asset data.
Task<ContentItemAsset> Retrieve(IContentQueryDataContainer container, string fieldName, CancellationToken cancellationToken = default)
Parameters
container
IContentQueryDataContainerContainer with content item asset field.
fieldName
stringField to retrieve content item asset from.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ContentItemAsset>
Exceptions
- ArgumentNullException
Thrown when
container
is null.- ArgumentException
Thrown when
fieldName
is null or empty or the ContentItemGUID was not included in the container.- InvalidOperationException
Thrown when content type does not contain asset field with specified name or the data cannot be deserialized.