Class PersistenceLoadBytes
Use case for loading a byte array from the blob store.
Inherited Members
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. |