Skip to main content

ModIndex

A class in TavernLib, TavernLib.Backend.Mods.

Every trusted source's repository.json merged: a list of ModSummary plus the replacements they list.

Constructors​

MemberWhat it is
ModIndex()Builds the index from the fetched summaries, replacements, incompatible pairs and withdrawn versions; the last two are optional.
ModIndex(IEnumerable<ModSummary> summaries, IEnumerable<ModReplacement> replaced, IEnumerable<ModIncompatibility> incompatible = null, IEnumerable<ModWithdrawal> withdrawn = null)Builds the index from the fetched summaries, replacements, incompatible pairs and withdrawn versions; the last two are optional.

Properties​

MemberWhat it is
List<ModIncompatibility> Incompatible { get; }Every source's incompatible pairs.
List<ModReplacement> Replaced { get; }Every source's replaced-mod entries.
List<ModWithdrawal> Withdrawn { get; }Every source's withdrawn versions.

Methods​

MemberWhat it is
List<ModIncompatibility> Clashes(IReadOnlyDictionary<string, string> versions)The incompatible pairs that apply to a set of installed versions (id to version), each pair once. A version that can't be read counts as below any bound.
static ModReplacement ReplacementOfUnlisted(IReadOnlyList<ModSummary> index, string modId)The replacement for an id no source lists any more, if a source lists its replacement. The default source's entry wins.
ModWithdrawal WithdrawalOf(string modId, string version)The withdrawal for an exact mod version, preferring the default source's entry, or null if it isn't withdrawn.

Used in​

Members of other types that take, return or hold a ModIndex: