Class AchievementSyncKeyCollisions
The achievements of one pull that would file their text under the same localization key, so that neither is created or moved into the string table until the author gives them ids whose keys differ.
Inherited Members
Namespace: Serenity.Achievements.Application.Sync
Assembly: Serenity.Achievements.Application.dll
Syntax
public sealed class AchievementSyncKeyCollisions
Remarks
AchievementLocalizationKeys keeps nothing but letters and digits, so final-boss and
final_boss share ACHIEVEMENT_FINAL_BOSS_NAME: the second one would meet the first one's text under
its own key and either point at it or destroy it. Every achievement the pull acts on counts, and so does every
other achievement the project holds, because the text of one of those may already live under that key — under the
key its id derives, and under the keys it actually uses when it was given others.
Fields
None
Declaration
public static readonly AchievementSyncKeyCollisions None
Field Value
| Type | Description |
|---|---|
| AchievementSyncKeyCollisions | The result for a pull in which no two achievements share a key. |
Properties
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether no two achievements share a key. |
Reasons
Declaration
public IReadOnlyList<string> Reasons { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> | Every collision found, once each, in the author's words. |
Methods
Find(IReadOnlyList<AchievementSyncKeyOwner>, IEnumerable<AchievementSyncExistingAchievement>)
Finds the achievements that share a key.
Declaration
public static AchievementSyncKeyCollisions Find(IReadOnlyList<AchievementSyncKeyOwner> acting, IEnumerable<AchievementSyncExistingAchievement> existing)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<AchievementSyncKeyOwner> | acting | The achievements the pull would create or move into the string table. |
| IEnumerable<AchievementSyncExistingAchievement> | existing | Every achievement the project holds, with the keys its text really uses. May be null. |
Returns
| Type | Description |
|---|---|
| AchievementSyncKeyCollisions |
ReasonFor(string)
Why the achievement of apiName cannot be created or moved into the string table.
Declaration
public string ReasonFor(string apiName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | apiName | The storefront identity of the achievement. |
Returns
| Type | Description |
|---|---|
| string | The reason, or empty when it can. |