Table of Contents

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

packageId string

Offline package identifier.

sourceId string

Optional source identifier.

cancellationToken CancellationToken

Cancellation 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

state OfflineSyncState

State to save.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task that completes when state is stored.