LaunchBoxContributors
On this page

IGameMatchCapability14.1

Interface in Unbroken.LaunchBox.Plugins.Components.GameData

C#
public interface IGameMatchCapability
Finds source-local game candidates for a library game that has no known source ID.

Remarks

Sources that can only be queried with a known ID need not implement this capability, but such sources only participate for games that already carry an association. Return candidates in preference order and mark exact title matches; LaunchBox does not automatically select an inexact candidate from a plugin source.

Methods

  • FindMatchesAsyncFinds candidate games for the supplied library game details.
  • IsPlatformSupportedAsyncChecks whether matching should proceed for the supplied platform. The default implementation returns true.

FindMatchesAsync

C#
Task<GameMatchResult> FindMatchesAsync(
    GameMatchRequest request,
    CancellationToken cancellationToken
)
Finds candidate games for the supplied library game details.
request
The title and optional platform, file, region, and alternate titles of one library game.
cancellationToken
Cancels the operation.

Returns

Candidates in preference order and diagnostics.

IsPlatformSupportedAsync

C#
Task<bool> IsPlatformSupportedAsync(
    string platform,
    IReadOnlyCollection<string> alternateNames,
    CancellationToken cancellationToken
)
Checks whether matching should proceed for the supplied platform. The default implementation returns true.

Remarks

Override when the source can determine platform coverage before matching individual games. Source-local platform identifiers remain private to the source.
platform
The library platform name.
alternateNames
Other known names for the same platform, including its canonical name when available.
cancellationToken
Cancels the lookup.

Returns

True when game matching should proceed, or false after establishing that the platform has no supported games. Failures and account changes must throw rather than return false.