Class PersistenceSaveObject
Use case for saving a serialized object to the blob store.
Inherited Members
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. |