Class ReleaseContext
Use case for releasing all assets associated with a specific context.
Frees up memory by removing cached assets that are no longer needed.
Inherited Members
Namespace: Serenity.AssetPrefetcher.Application.UseCases
Assembly: Serenity.AssetPrefetcher.Application.dll
Syntax
public class ReleaseContext : IAsyncUseCase<ReleaseContextInput>, IUseCase
Constructors
ReleaseContext(IAssetPrefetcherService)
Initializes the use case with the required asset prefetcher service.
Declaration
public ReleaseContext(IAssetPrefetcherService prefetcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetPrefetcherService | prefetcher | The asset prefetcher service to use for operations |
Methods
ExecuteAsync(ReleaseContextInput, CancellationToken)
Executes the context release operation to free associated assets.
Declaration
public Task ExecuteAsync(ReleaseContextInput input, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ReleaseContextInput | input | Input containing the context ID to release |
| CancellationToken | ct |
Returns
| Type | Description |
|---|---|
| Task | Completed task representing the release operation |