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
containerIContentQueryDataContainerContainer with content item asset field.
fieldNamestringField to retrieve content item asset from.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ContentItemAsset>
Exceptions
- ArgumentNullException
Thrown when
containeris null.- ArgumentException
Thrown when
fieldNameis 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.