Class AchievementProjectSnapshot
What a project's achievement configuration looks like to the rules that check it as a whole: how much of it there is, which storefronts it claims, which ones its achievements actually name, and whether anything installs the module at boot.
Inherited Members
Namespace: Serenity.Achievements.Application.Authoring
Assembly: Serenity.Achievements.Application.dll
Syntax
public sealed class AchievementProjectSnapshot
Remarks
A plain, engine-free description rather than the assets themselves, for the same reason AchievementAuthoringSnapshot is one: the rules over it then run identically against a real project scan, against a wizard's preview, and against a fixture in a headless test. Counting rather than carrying the assets is deliberate — every rule here is about how many there are and what they add up to, never about any one of them.
Constructors
AchievementProjectSnapshot(int, int, IReadOnlyCollection<AchievementPlatformKind>, IReadOnlyCollection<AchievementPlatformKind>, bool, string)
Describes a project's achievement configuration.
Declaration
public AchievementProjectSnapshot(int achievementCount, int settingsAssetCount, IReadOnlyCollection<AchievementPlatformKind> enabledPlatforms, IReadOnlyCollection<AchievementPlatformKind> platformsNamedByAnyAchievement, bool anyProfileRunsTheInstallTask, string installMethodName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| int | achievementCount | How many achievements the project authors. |
| int | settingsAssetCount | How many achievement settings assets it carries. |
| IReadOnlyCollection<AchievementPlatformKind> | enabledPlatforms | The storefronts those settings assets put together. Null means none. |
| IReadOnlyCollection<AchievementPlatformKind> | platformsNamedByAnyAchievement | The storefronts at least one achievement names an identifier for. Null means none. |
| bool | anyProfileRunsTheInstallTask | Whether a boot profile installs the achievements module. |
| string | installMethodName | The installer method a boot profile has to call, named by whoever knows it so the finding can quote it. Blank falls back to UnnamedInstallMethod. |
Fields
UnnamedInstallMethod
What the install method is called when the caller did not say.
Declaration
public const string UnnamedInstallMethod = "the achievements install method"
Field Value
| Type | Description |
|---|---|
| string |
Properties
AchievementCount
Declaration
public int AchievementCount { get; }
Property Value
| Type | Description |
|---|---|
| int | How many achievements the project authors. |
AnyProfileRunsTheInstallTask
Declaration
public bool AnyProfileRunsTheInstallTask { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether a boot profile installs the achievements module. |
AuthorsAnyAchievement
Declaration
public bool AuthorsAnyAchievement { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether the project authors any achievement at all. |
EnabledPlatforms
Declaration
public IReadOnlyCollection<AchievementPlatformKind> EnabledPlatforms { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<AchievementPlatformKind> | The storefronts the project says it ships on. |
InstallMethodName
Declaration
public string InstallMethodName { get; }
Property Value
| Type | Description |
|---|---|
| string | The installer method a boot profile has to call. |
PlatformsNamedByAnyAchievement
Declaration
public IReadOnlyCollection<AchievementPlatformKind> PlatformsNamedByAnyAchievement { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<AchievementPlatformKind> | The storefronts at least one achievement names an identifier for. |
SettingsAssetCount
Declaration
public int SettingsAssetCount { get; }
Property Value
| Type | Description |
|---|---|
| int | How many achievement settings assets the project carries. |