Class UpdateTarget
Use case for updating target asset configurations and priorities.
Recalculates context demand (e.g. {i-1, i, i+1}) with updated priorities
and schedules prefetch operations accordingly.
Inherited Members
Namespace: Serenity.AssetPrefetcher.Application.UseCases
Assembly: Serenity.AssetPrefetcher.Application.dll
Syntax
public class UpdateTarget : IAsyncUseCase<UpdateTargetInput>, IUseCase
Constructors
UpdateTarget(IAssetPrefetcherService)
Initializes the use case with the required asset prefetcher service.
Declaration
public UpdateTarget(IAssetPrefetcherService prefetcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetPrefetcherService | prefetcher | The asset prefetcher service to use for operations |
Methods
ExecuteAsync(UpdateTargetInput, CancellationToken)
Executes the target update operation by scheduling prefetch requests for all target assets.
The domain service handles scheduling, cancellation, and eviction strategies.
Declaration
public Task ExecuteAsync(UpdateTargetInput input, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateTargetInput | input | Input containing context ID and target asset configurations |
| CancellationToken | ct |
Returns
| Type | Description |
|---|---|
| Task | Task representing the async update operation |