Class AchievementReconciler
Pure set algebra over local and platform unlock states. The single policy every platform gateway and every store shares for answering "who has to learn what".
Inherited Members
Namespace: Serenity.Achievements.Domain.Services
Assembly: Serenity.Achievements.Domain.dll
Syntax
public static class AchievementReconciler
Remarks
Identifiers the project does not define are dropped from both directions: a platform account routinely carries achievements from an older build, and mirroring one locally would create a row no definition can render, award points for, or ever unlock again.
Methods
Build(IEnumerable<AchievementId>, IEnumerable<AchievementId>, IEnumerable<AchievementId>)
Builds the two-way difference between the local and platform unlock sets.
Declaration
public static AchievementReconciliationPlan Build(IEnumerable<AchievementId> locallyUnlocked, IEnumerable<AchievementId> platformUnlocked, IEnumerable<AchievementId> knownIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<AchievementId> | locallyUnlocked | The achievements the local store already records as unlocked. May be null. |
| IEnumerable<AchievementId> | platformUnlocked | The achievements the platform account reports as unlocked. May be null. |
| IEnumerable<AchievementId> | knownIds | The achievements this project defines. May be null, in which case the plan is empty. |
Returns
| Type | Description |
|---|---|
| AchievementReconciliationPlan | The achievements to mirror locally and the achievements to push to the platform. |