IPluginDataStore14.1
Interface in Unbroken.LaunchBox.Plugins.Services.Storage
public interface IPluginDataStore
Provides persistent, non-secret storage scoped to the requesting plugin.
Methods
GetValueAsyncGets the requested value, or null when no value exists.RemoveValueAsyncRemoves the requested value.SetValueAsyncStores the requested value.
GetValueAsync
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, ornull when the key has no value. The plugin owns the serialized format.
RemoveValueAsync
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
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.