27 private readonly List<IAnkiVersionAdapter> adapters = [];
48 ArgumentNullException.ThrowIfNull(adapter);
49 adapters.
Add(adapter);
64 ArgumentNullException.ThrowIfNull(version);
65 return adapters.FirstOrDefault(adapter => adapter.Supports(version)) ??
throw new NotSupportedException($
"Anki {version} is not supported. Register an IAnkiVersionAdapter after validating its collection, scheduler, and package formats.");
Describes format capabilities verified against the Anki 26.05 release family.
IAnkiVersionAdapter Resolve(Version version)
Returns the highest-precedence registered adapter supporting an Anki application version.
static AnkiCompatibilityRegistry CreateDefault()
Creates a new registry populated with AnkiIO's built-in, evidence-backed adapters.
AnkiCompatibilityRegistry()
Initializes an empty compatibility registry.
AnkiCompatibilityRegistry Add(IAnkiVersionAdapter adapter)
Registers an adapter at the end of the resolution precedence.
Describes collection, scheduler, and package capabilities verified for an Anki version family.