LaunchBoxContributors
On this page

IPluginDataStore14.1

Interface in Unbroken.LaunchBox.Plugins.Services.Storage

C#
public interface IPluginDataStore
Provides persistent, non-secret storage scoped to the requesting plugin.

Methods

GetValueAsync

C#
Task<byte[]?> GetValueAsync(
    PluginDataStoreGetRequest request,
    CancellationToken cancellationToken
)
Gets the requested value, or null when no value exists.
request
The plugin-local key identifying the value.
cancellationToken
A token requesting cancellation of the operation.

Returns

The stored bytes, or null when the key has no value. The plugin owns the serialized format.

RemoveValueAsync

C#
Task RemoveValueAsync(
    PluginDataStoreRemoveRequest request,
    CancellationToken cancellationToken
)
Removes the requested value.
request
The plugin-local key identifying the value to remove.
cancellationToken
A token requesting cancellation of the operation.

Returns

A task representing the removal operation.

SetValueAsync

C#
Task SetValueAsync(
    PluginDataStoreSetRequest request,
    CancellationToken cancellationToken
)
Stores the requested value.
request
The plugin-local key and bytes to persist.
cancellationToken
A token requesting cancellation of the operation.

Returns

A task representing the storage operation.