Class AchievementCopilotScript
Pure builder that turns a Push-direction AchievementSyncPlan and its accepted AchievementSyncReviewSelection into the manual walkthrough a Copilot-mode run hands an author instead of sending a real push.
Inherited Members
Namespace: Serenity.Achievements.Application.Sync
Assembly: Serenity.Achievements.Application.dll
Syntax
public static class AchievementCopilotScript
Remarks
Reuses BuildWorkItems(AchievementSyncPlan, AchievementSyncReviewSelection, IReadOnlyList<AchievementSyncRecord>) for its ordering and gating rather than re-deriving either: the same executor a real push runs through already guarantees a rejected field change never becomes a value to send, so building the walkthrough from its output means a rejected value can never become a value to paste either — the two transports can never silently disagree about what "accepted" means.
This type stays platform-neutral on purpose: it carries a field's AchievementSyncFieldKind, locale code and paste value, never a partner site's own field label or form layout. Turning that into words an author reads on a specific storefront's editor page is a presenter's job, which lives with that storefront's adapter rather than here.
Methods
Build(AchievementSyncPlan, AchievementSyncReviewSelection, IReadOnlyList<AchievementSyncRecord>)
Builds one Copilot walkthrough script per achievement with at least one accepted change.
Declaration
public static IReadOnlyList<CopilotAchievementScript> Build(AchievementSyncPlan plan, AchievementSyncReviewSelection selection, IReadOnlyList<AchievementSyncRecord> pushRecords)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementSyncPlan | plan | A Push-direction plan. Conflicted items are skipped. |
| AchievementSyncReviewSelection | selection | Which of the plan's field changes were accepted. |
| IReadOnlyList<AchievementSyncRecord> | pushRecords | The record to source each achievement's payload from, one per api name — the same records a real push's work items would be built from. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<CopilotAchievementScript> | The scripts, ordered by api name (mirrors AchievementPushPlanExecutor's own determinism). Empty when nothing was accepted. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | When no plan or selection were given. |