Class PersistenceLoadObject
Use case for loading a deserialized object from the blob store.
Inherited Members
Namespace: Serenity.Persistence.Application.UseCases
Assembly: Serenity.Global.Application.dll
Syntax
public class PersistenceLoadObject
Remarks
Reads raw bytes from the store, optionally inverse-transforms them, then deserializes to the target type.
Constructors
PersistenceLoadObject(IBlobStore)
Initializes a new instance of the PersistenceLoadObject class.
Declaration
public PersistenceLoadObject(IBlobStore store)
Parameters
| Type | Name | Description |
|---|---|---|
| IBlobStore | store | The blob store to be used for read operations. |
Methods
ExecuteAsync<T>(PersistenceLoadObjectInput<T>, CancellationToken)
Executes the load object operation asynchronously.
Declaration
public Task<T> ExecuteAsync<T>(PersistenceLoadObjectInput<T> input, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| PersistenceLoadObjectInput<T> | input | The input containing the key, serializer and optional transformer. |
| CancellationToken | cancellationToken | A token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| Task<T> | A task containing the loaded and deserialized object. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to load. |