Class AchievementSyncConnectorCatalog
Which storefronts the Achievement Platform Sync wizard can build a live connector for, and how to build one.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Sync
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public sealed class AchievementSyncConnectorCatalog
Remarks
The Platform step's card grid stays entirely data-driven off AchievementPlatformKind: it never branches on which platform it is drawing, only on whether IsWired(AchievementPlatformKind) answers true for that platform. A storefront is wired by the IAchievementSyncConnectorSource that claims it, and that source comes from a discovered IAchievementSyncConnectorSourceProvider, so a future Xbox/Epic/PlayStation connector only ever needs a new provider and source — never a new conditional here or in the step GUI. The sources are supplied by the window's composition, so a test builds a catalog around fakes. Two sources claiming one storefront fail construction: the catalog never picks a winner.
Constructors
AchievementSyncConnectorCatalog(IEnumerable<IAchievementSyncConnectorSource>)
Creates a catalog that wires every storefront one of sources claims.
Declaration
public AchievementSyncConnectorCatalog(IEnumerable<IAchievementSyncConnectorSource> sources)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IAchievementSyncConnectorSource> | sources | The connector sources, at most one per storefront. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException | A source is null, or two sources claim the same storefront. |
Methods
Build(AchievementPlatformKind, AchievementSyncWizardSession)
Builds the connector for platform, given the session to configure it from.
Declaration
public IAchievementDefinitionSyncConnector Build(AchievementPlatformKind platform, AchievementSyncWizardSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPlatformKind | platform | The storefront to build a connector for. |
| AchievementSyncWizardSession | session | The wizard session the connector reads its configuration from. |
Returns
| Type | Description |
|---|---|
| IAchievementDefinitionSyncConnector | The connector, or null when the platform is not wired yet. |
IsWired(AchievementPlatformKind)
Whether a live connector can be built for platform yet.
Declaration
public bool IsWired(AchievementPlatformKind platform)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPlatformKind | platform |
Returns
| Type | Description |
|---|---|
| bool |