logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PersistenceSaveObject

    Use case for saving a serialized object to the blob store.

    Inheritance
    object
    PersistenceSaveObject
    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 PersistenceSaveObject
    Remarks

    Serializes the object, optionally transforms it, then writes it to the store.

    Constructors

    PersistenceSaveObject(IBlobStore)

    Initializes a new instance of the PersistenceSaveObject class.

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

    The blob store to be used for write operations.

    Methods

    ExecuteAsync<T>(PersistenceSaveObjectInput<T>, CancellationToken)

    Executes the save object operation asynchronously.

    Declaration
    public Task ExecuteAsync<T>(PersistenceSaveObjectInput<T> input, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    PersistenceSaveObjectInput<T> input

    The input containing the key, value, serializer and optional transformer.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A task that represents the asynchronous save operation.

    Type Parameters
    Name Description
    T

    The type of the object to save.

    In this article
    © 2026 Serenity. All Rights Reserved