logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ReleaseContext
    Implements
    IAsyncUseCase<ReleaseContextInput>
    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 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

    Implements

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