logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PrewarmContext

    Use case for prewarming a context by loading multiple assets simultaneously.
    Optimizes performance by preloading assets that are likely to be needed together.

    Inheritance
    object
    PrewarmContext
    Implements
    IAsyncUseCase<PrewarmContextInput>
    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 PrewarmContext : IAsyncUseCase<PrewarmContextInput>, IUseCase

    Constructors

    PrewarmContext(IAssetPrefetcherService)

    Initializes the use case with the required asset prefetcher service.

    Declaration
    public PrewarmContext(IAssetPrefetcherService prefetcher)
    Parameters
    Type Name Description
    IAssetPrefetcherService prefetcher

    The asset prefetcher service to use for operations

    Methods

    ExecuteAsync(PrewarmContextInput, CancellationToken)

    Executes the context prewarming operation for multiple assets.

    Declaration
    public Task ExecuteAsync(PrewarmContextInput input, CancellationToken ct = default)
    Parameters
    Type Name Description
    PrewarmContextInput input

    Input containing context ID, asset keys, and policy

    CancellationToken ct
    Returns
    Type Description
    Task

    Task representing the async prewarming operation

    Implements

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