Class AchievementPushWorkItem
One unit of work a push sends to a storefront: either an achievement's metadata, or one of its icons.
Inherited Members
Namespace: Serenity.Achievements.Application.Sync
Assembly: Serenity.Achievements.Application.dll
Syntax
public sealed class AchievementPushWorkItem
Remarks
Built by AchievementPushPlanExecutor from a Push-direction AchievementSyncPlan and its accepted AchievementSyncReviewSelection. This type carries no network or platform-specific knowledge of its own — a connector's own push transport decides how to send it, including whether an achievement is new on the platform — so it also doubles as the wizard's Apply-step preview row: kind, api name, and the field changes it would send.
Constructors
AchievementPushWorkItem(Fields)
Creates a work item.
Declaration
public AchievementPushWorkItem(AchievementPushWorkItem.Fields fields)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPushWorkItem.Fields | fields | The values to build it from. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | When no fields, or no record, were given. |
Properties
ApiName
Declaration
public string ApiName { get; }
Property Value
| Type | Description |
|---|---|
| string | The achievement's platform-side identity key. |
FieldChanges
Declaration
public IReadOnlyList<AchievementSyncFieldChange> FieldChanges { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<AchievementSyncFieldChange> | The accepted field change(s) this work item sends, for a preview's field summary. |
Kind
Declaration
public AchievementPushWorkItemKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| AchievementPushWorkItemKind | What this work item does when it runs. |
Record
Declaration
public AchievementSyncRecord Record { get; }
Property Value
| Type | Description |
|---|---|
| AchievementSyncRecord | The record to send: for SaveAchievement its metadata fields, for an upload kind the relevant icon payload. |
Methods
FieldSummary()
A short human-readable summary of the field changes this work item sends, for a preview row.
Declaration
public string FieldSummary()
Returns
| Type | Description |
|---|---|
| string |