logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PersistenceLoadBytes

    Use case for loading a byte array from the blob store.

    Inheritance
    object
    PersistenceLoadBytes
    Implements
    IAsyncUseCase<PersistenceLoadBytesInput, byte[]>
    IUseCase
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Persistence.Application.UseCases
    Assembly: Serenity.Global.Application.dll
    Syntax
    public class PersistenceLoadBytes : IAsyncUseCase<PersistenceLoadBytesInput, byte[]>, IUseCase
    Remarks

    Opens a read stream from the blob store and copies its contents to a byte array.

    Constructors

    PersistenceLoadBytes(IBlobStore)

    Initializes a new instance of the PersistenceLoadBytes class.

    Declaration
    public PersistenceLoadBytes(IBlobStore store)
    Parameters
    Type Name Description
    IBlobStore store

    The blob store to be used for read operations.

    Methods

    ExecuteAsync(PersistenceLoadBytesInput, CancellationToken)

    Executes the load bytes operation asynchronously.

    Declaration
    public Task<byte[]> ExecuteAsync(PersistenceLoadBytesInput input, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    PersistenceLoadBytesInput input

    The input containing the key of the byte data to load.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<byte[]>

    A task containing the loaded byte array.

    Implements

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