Class AchievementSyncApplyStepGui
The wizard's Apply step. For Pull, a preview of the accepted changes (run automatically on entering
the step, through AchievementSyncAssetWriter with previewOnly: true), then the
real apply report once the author confirms. For Push, a preview of the ordered
AchievementPushWorkItems the session's AchievementPushPlanExecutor run
produced, then the connector's own AchievementPushOutcome once the author confirms —
see DrawPush(AchievementSyncWizardSession).
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Sync
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public sealed class AchievementSyncApplyStepGui
Remarks
The Pull preview and the real apply share one code path — Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncApplyStepGui.RunWriter(Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncWizardSession,System.Collections.Generic.IReadOnlyDictionary{System.String,Serenity.Achievements.Infrastructure.Settings.UnityAchievementDefinition},System.Boolean,Serenity.Achievements.Infrastructure.Editor.Sync.IAchievementSyncIconSource) — differing only in which AchievementSyncAssetWriter was constructed with, the same discipline the writer itself follows for every individual field. Push has no writer of its own to preview through: the work items AchievementSyncWindow already computed on entering this step ARE the preview, and running them for real is the window's own job (it owns the connector and the async push operation), not this type's.
Constructors
AchievementSyncApplyStepGui()
Declaration
public AchievementSyncApplyStepGui()
Methods
Draw(AchievementSyncWizardSession)
Draws the step.
Declaration
public bool Draw(AchievementSyncWizardSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncWizardSession | session | The session to read reports from. |
Returns
| Type | Description |
|---|---|
| bool | Whether the author changed the choice to replace the text entries already hold, which makes the preview stale — the caller recomputes it. |
DrawPush(AchievementSyncWizardSession)
Draws the Push-direction Apply step: the ordered work-item preview, then the push result.
Declaration
public AchievementSyncApplyStepGui.PushResult DrawPush(AchievementSyncWizardSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncWizardSession | session | The session to read the work items, progress, and outcome from. |
Returns
| Type | Description |
|---|---|
| AchievementSyncApplyStepGui.PushResult |
LogApplyReport(AchievementSyncApplyReport, SerenityWizardActivityLog)
Appends every action and message of a report to the wizard's activity log, ✓/⚠/✕ per line.
Declaration
public static void LogApplyReport(AchievementSyncApplyReport report, SerenityWizardActivityLog log)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncApplyReport | report | The report to log. |
| SerenityWizardActivityLog | log | The log to append to. |
PrimaryLabel(AchievementSyncWizardSession)
The footer's primary-button label, naming how many changes an apply would touch.
Declaration
public static string PrimaryLabel(AchievementSyncWizardSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncWizardSession | session | The session to read the accepted count from. |
Returns
| Type | Description |
|---|---|
| string |
RunApply(AchievementSyncWizardSession, IReadOnlyDictionary<string, UnityAchievementDefinition>, IAchievementSyncIconSource)
Runs the real apply (writes assets and string table entries) and stores it on the session.
Declaration
public static AchievementSyncApplyReport RunApply(AchievementSyncWizardSession session, IReadOnlyDictionary<string, UnityAchievementDefinition> definitionsByLocalId, IAchievementSyncIconSource iconSource = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncWizardSession | session | The session to read the plan and selection from, and to store the report into. |
| IReadOnlyDictionary<string, UnityAchievementDefinition> | definitionsByLocalId | The project's authored achievements, keyed by id. |
| IAchievementSyncIconSource | iconSource | The icons already downloaded for the ones the author accepted; null when none were. |
Returns
| Type | Description |
|---|---|
| AchievementSyncApplyReport | The apply report, for the caller to log. |
RunPreview(AchievementSyncWizardSession, IReadOnlyDictionary<string, UnityAchievementDefinition>)
Runs a preview (no writes) and stores it on the session — called when the wizard lands on this step.
Declaration
public static void RunPreview(AchievementSyncWizardSession session, IReadOnlyDictionary<string, UnityAchievementDefinition> definitionsByLocalId)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncWizardSession | session | The session to read the plan and selection from, and to store the preview into. |
| IReadOnlyDictionary<string, UnityAchievementDefinition> | definitionsByLocalId | The project's authored achievements, keyed by id. |