Class StructuredStoreAchievementAdapter
IAchievementStore implementation that translates every achievement operation
into calls against the generic IStructuredStore contract, via
AchievementRecordMapping. The single adapter every achievement backend
(PlayerPrefs, local file, HTTP, Postgres, MySql, Mongo, Sqlite, custom) shares, so the
revision policy is expressed exactly once instead of once per backend.
Inheritance
StructuredStoreAchievementAdapter
Assembly: Serenity.Achievements.Infrastructure.dll
Syntax
public class StructuredStoreAchievementAdapter : IAchievementStore
Constructors
StructuredStoreAchievementAdapter(IStructuredStore, StoreTable, StoreTable, ILogService)
Declaration
public StructuredStoreAchievementAdapter(IStructuredStore store, StoreTable unlocksTable, StoreTable progressTable, ILogService logService)
Parameters
| Type |
Name |
Description |
| IStructuredStore |
store |
The generic structured store backing every achievement operation.
|
| StoreTable |
unlocksTable |
The table/collection unlock records are stored in.
|
| StoreTable |
progressTable |
The table/collection progress rows are stored in.
|
| ILogService |
logService |
Logging service used to report failures. May be null.
|
Exceptions
Methods
ClearAsync(PlayerId, CancellationToken)
Declaration
public Task ClearAsync(PlayerId player, CancellationToken cancellationToken)
Parameters
Returns
EnsureSchemaAsync(CancellationToken)
Declaration
public Task EnsureSchemaAsync(CancellationToken cancellationToken)
Parameters
Returns
GetProgressAsync(PlayerId, CancellationToken)
Declaration
public Task<IReadOnlyList<AchievementProgress>> GetProgressAsync(PlayerId player, CancellationToken cancellationToken)
Parameters
Returns
GetUnlocksAsync(PlayerId, CancellationToken)
Declaration
public Task<IReadOnlyList<AchievementUnlockRecord>> GetUnlocksAsync(PlayerId player, CancellationToken cancellationToken)
Parameters
Returns
HealthCheckAsync(CancellationToken)
Declaration
public Task<bool> HealthCheckAsync(CancellationToken cancellationToken)
Parameters
Returns
UpsertProgressAsync(PlayerId, AchievementProgress, CancellationToken)
Declaration
public Task UpsertProgressAsync(PlayerId player, AchievementProgress progress, CancellationToken cancellationToken)
Parameters
Returns
UpsertUnlockAsync(AchievementUnlockRecord, CancellationToken)
Declaration
public Task UpsertUnlockAsync(AchievementUnlockRecord record, CancellationToken cancellationToken)
Parameters
Returns
Implements