LaunchBoxContributors
On this page

GameDataSourceDescriptor14.1

Class in Unbroken.LaunchBox.Plugins.Components.GameData

C#
public sealed class GameDataSourceDescriptor
Names a logical source; replacement implementations must preserve its game ID conventions.

Constructors

GameDataSourceDescriptor

C#
public GameDataSourceDescriptor(string sourceId, PluginText displayName)
Creates source metadata without performing I/O.
sourceId
Canonical lowercase ID, at most 128 ASCII letters, digits, dots, underscores, or hyphens; starts with a letter or digit.
displayName
Plugin-owned translatable name.

Properties

  • DisplayNameGets the translatable name.
  • GameIdNamespaceGets or initializes the namespace whose external identifier values are also this source's local game IDs.
  • IconResourceIdGets or initializes an optional package image resource ID.
  • MaximumBatchSizeGets or initializes the maximum game IDs requested in one metadata or media callback. Defaults to 100; the host may use smaller batches.
  • SourceIdGets the implementation-independent source ID.

DisplayName

C#
public PluginText DisplayName { get; }
Gets the translatable name.

GameIdNamespace

C#
public string? GameIdNamespace { get; init; }
Gets or initializes the namespace whose external identifier values are also this source's local game IDs.

Remarks

Optional; omission preserves the conventional storefront.<source ID> association. Namespaces are compared ordinally. LaunchBox supplies storefront identities as storefront.<logical storefront ID>, and Games Database IDs as gamesdb. Storefront import uses this source's metadata and media capabilities only when the resolved namespace matches storefront.<IStorefrontProvider.StorefrontId>. Set this property explicitly when SourceId differs from StorefrontId and the source accepts that storefront's game IDs. Other namespaces are not called with storefront-local IDs. Declaring a namespace enables exact ID-based retrieval without title matching; it does not assign library ownership.

IconResourceId

C#
public string? IconResourceId { get; init; }
Gets or initializes an optional package image resource ID.

MaximumBatchSize

C#
public int MaximumBatchSize { get; init; }
Gets or initializes the maximum game IDs requested in one metadata or media callback. Defaults to 100; the host may use smaller batches.

Remarks

Use 1 for a service that retrieves one game at a time so each callback remains within the host timeout. Must be positive.

SourceId

C#
public string SourceId { get; }
Gets the implementation-independent source ID.

Remarks

Capabilities sharing this logical source ID must use the same source-local game-ID namespace. A component exposing different game-ID namespaces must distinguish their logical source identities; sharing a component instance alone does not establish interchangeable IDs.