PolyhydraGames.Api.SystemDefinitions
1.0.5.169
dotnet add package PolyhydraGames.Api.SystemDefinitions --version 1.0.5.169
NuGet\Install-Package PolyhydraGames.Api.SystemDefinitions -Version 1.0.5.169
<PackageReference Include="PolyhydraGames.Api.SystemDefinitions" Version="1.0.5.169" />
<PackageVersion Include="PolyhydraGames.Api.SystemDefinitions" Version="1.0.5.169" />
<PackageReference Include="PolyhydraGames.Api.SystemDefinitions" />
paket add PolyhydraGames.Api.SystemDefinitions --version 1.0.5.169
#r "nuget: PolyhydraGames.Api.SystemDefinitions, 1.0.5.169"
#:package PolyhydraGames.Api.SystemDefinitions@1.0.5.169
#addin nuget:?package=PolyhydraGames.Api.SystemDefinitions&version=1.0.5.169
#tool nuget:?package=PolyhydraGames.Api.SystemDefinitions&version=1.0.5.169
PolyhydraGames.Api.SystemDefinitions
Typed system definition helpers for game platform slugs, folders, emulator cores, file extensions, and IGDB identifiers.
The library wraps a curated platform dataset and normalizes common aliases such
as mastersystem → sms, pce → pcengine, and arcade variants → arcade.
Tags
- api
- dotnet
- api-system-definitions
- system
- definitions
- streaming
Install
dotnet add package PolyhydraGames.Api.SystemDefinitions
Package id PolyhydraGames.Api.SystemDefinitions, targets net10.0. The platform
dataset ships embedded in the assembly, so no network or file access is needed by default.
Usage
// Loads the embedded dataset. Pass dataSource (file path or http/https URL) to override.
await SystemsDatabase.Setup(logger);
var system = SystemsDatabase.Instance.GetSystem("SMS");
var folder = "mastersystem".ToFolder();
var core = "SMS".GetCoreFromSlug();
var slug = SystemsDatabase.Instance.GetSystemFromExtension(".gba");
var inventorySlug = SystemsDatabase.Instance.GetSystemFromPath("/roms/snes/Chrono Trigger.sfc");
var igdbPlatformId = SystemsDatabase.Instance.GetProviderIdFromSlug("snes", "igdb");
Setup publishes a replacement database only after its definitions load and
validate. It throws InvalidOperationException when the selected source is
missing, malformed, unreadable, or empty; callers that reconfigure an already
initialized database can catch that exception and continue using the prior
initialized SystemsDatabase.Instance. Unknown slugs throw
SystemDefinitionNotFoundException. SystemsDatabase.Systems is a read-only view.
Development
All build, test and quality steps go through the Makefile; CI runs the same targets.
make ci # restore, lint (format check + warnings-as-errors Release build), test, coverage
make test # tests with hang protection (timeout + --blame-hang-timeout)
make mutate # Stryker mutation tests; fails below the threshold in stryker-config.json
make format # apply dotnet format
Default tests use local fixtures and need no network access. Use
python scripts/refresh-platform-fixture.py to regenerate
API.SystemDefinitions.Test/TestData/platform.fixture.json from the upstream dataset.
Pack:
dotnet pack Api.SystemDefinitions/PolyhydraGames.Api.SystemDefinitions.csproj --configuration Release
Roadmap
Docs
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- PolyhydraGames.Core.Interfaces.Gaming (>= 1.0.0.13)
- PolyhydraGames.Core.Models (>= 2.0.1.75)
- PolyhydraGames.Extensions (>= 2.1.2.4)
- Spectre.Console (>= 0.57.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on PolyhydraGames.Api.SystemDefinitions:
| Package | Downloads |
|---|---|
|
PolyhydraGames.IGDB
Package Description |
|
|
PolyhydraGames.GamePlayer.Core
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.