Class PlatformSchemaRule
Decides when a storefront that reports no achievements is a project problem rather than a project that simply mirrors none.
Inherited Members
Namespace: Serenity.Achievements.Domain.Services
Assembly: Serenity.Achievements.Domain.dll
Syntax
public static class PlatformSchemaRule
Remarks
A storefront answers from the schema its partner site published. An application that never published one, or a process running under another application id, answers an empty list — which looks exactly like a healthy account with nothing unlocked unless the project is asked what it expected to find.
The rule only detects a TOTAL absence of achievements. A schema that is published but lacks the identifiers this project mirrors passes it; the storefront rejects those one call at a time, and the gateway reports each rejected identifier when it is used.
Methods
IsPublishedSchemaMissing(int, uint)
Whether the storefront's empty answer contradicts the project: it mirrors achievements, and the storefront knows none of them.
Declaration
public static bool IsPublishedSchemaMissing(int mirroredAchievementCount, uint platformAchievementCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | mirroredAchievementCount | How many declared achievements name an identifier on this storefront. |
| uint | platformAchievementCount | How many achievements the storefront reports for the running application. |
Returns
| Type | Description |
|---|---|
| bool | True when a published schema is evidently missing; false for a healthy schema or a project that mirrors nothing. |