Interface IOfflineSyncStateStore
- Namespace
- Honua.Sdk.Offline.Abstractions
- Assembly
- Honua.Sdk.Abstractions.dll
Sync state store adapter for package and source sync progress.
public interface IOfflineSyncStateStore
Methods
GetStateAsync(string, string?, CancellationToken)
Gets the last sync state for a package or source.
Task<OfflineSyncState?> GetStateAsync(string packageId, string? sourceId = null, CancellationToken cancellationToken = default)
Parameters
packageIdstringOffline package identifier.
sourceIdstringOptional source identifier.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<OfflineSyncState>
Persisted sync state, or null when no state exists.
SaveStateAsync(OfflineSyncState, CancellationToken)
Saves sync state for a package or source.
Task SaveStateAsync(OfflineSyncState state, CancellationToken cancellationToken = default)
Parameters
stateOfflineSyncStateState to save.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task
A task that completes when state is stored.