logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PrefetchAsset

    Use case for prefetching a single asset with specified priority and context.
    Encapsulates the business logic for individual asset prefetch operations.

    Inheritance
    object
    PrefetchAsset
    Implements
    IAsyncUseCase<PrefetchAssetInput>
    IUseCase
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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

    Implements

    IAsyncUseCase<TInput>
    IUseCase
    In this article
    © 2026 Serenity. All Rights Reserved