Struct PlatformUnlockQueryResult
The outcome of asking a platform account which achievements it already carries, keeping "the platform said nothing is unlocked" and "the platform could not be reached" apart.
Inherited Members
Namespace: Serenity.Achievements.Application.DTO
Assembly: Serenity.Achievements.Application.dll
Syntax
public readonly struct PlatformUnlockQueryResult
Remarks
Collapsing the two is a data-loss bug, not a cosmetic one: a failed query that reads as an empty set makes reconciliation conclude the platform is missing EVERY local unlock, and push all of them. Callers must check Succeeded before reconciling.
Fields
Succeeded
Whether the platform actually answered.
Declaration
public readonly bool Succeeded
Field Value
| Type | Description |
|---|---|
| bool |
Unlocked
The achievements the platform reported, empty when the query failed.
Declaration
public readonly IReadOnlyList<AchievementId> Unlocked
Field Value
| Type | Description |
|---|---|
| IReadOnlyList<AchievementId> |
Methods
Answered(IReadOnlyList<AchievementId>)
Builds the result for a query the platform answered.
Declaration
public static PlatformUnlockQueryResult Answered(IReadOnlyList<AchievementId> unlocked)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<AchievementId> | unlocked | The achievements the platform reported. |
Returns
| Type | Description |
|---|---|
| PlatformUnlockQueryResult |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Unreachable()
Builds the result for a query the platform could not answer.
Declaration
public static PlatformUnlockQueryResult Unreachable()
Returns
| Type | Description |
|---|---|
| PlatformUnlockQueryResult |