Class PrefetchAsset
Use case for prefetching a single asset with specified priority and context.
Encapsulates the business logic for individual asset prefetch operations.
Inherited Members
Namespace: Serenity.AssetPrefetcher.Application.UseCases
Assembly: Serenity.AssetPrefetcher.Application.dll
Syntax
public class PrefetchAsset : IAsyncUseCase<PrefetchAssetInput>, IUseCase
Constructors
PrefetchAsset(IAssetPrefetcherService)
Initializes the use case with the required asset prefetcher service.
Declaration
public PrefetchAsset(IAssetPrefetcherService prefetcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetPrefetcherService | prefetcher | The asset prefetcher service to use for operations |
Methods
ExecuteAsync(PrefetchAssetInput, CancellationToken)
Executes the prefetch operation for a single asset.
Declaration
public Task ExecuteAsync(PrefetchAssetInput input, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| PrefetchAssetInput | input | Input containing asset key, priority, and context information |
| CancellationToken | ct | Cancellation token for the async operation |
Returns
| Type | Description |
|---|---|
| Task | Task representing the async prefetch operation |