namespace StardewModdingAPI.Framework.ModData
{
/// A parsed representation of the fields from a for a specific manifest.
internal class ParsedModDataRecord
{
/*********
** Accessors
*********/
/// The underlying data record.
public ModDataRecord DataRecord { get; set; }
/// The default mod name to display when the name isn't available (e.g. during dependency checks).
public string DisplayName { get; set; }
/// The update key to apply.
public string UpdateKey { get; set; }
/// The mod version to apply.
public ISemanticVersion Version { get; set; }
/// The alternative URL the player can check for an updated version.
public string AlternativeUrl { get; set; }
/// The predefined compatibility status.
public ModStatus Status { get; set; } = ModStatus.None;
/// A reason phrase for the , or null to use the default reason.
public string StatusReasonPhrase { get; set; }
/// The upper version for which the applies (if any).
public ISemanticVersion StatusUpperVersion { get; set; }
/*********
** Public methods
*********/
/// Get a semantic local version for update checks.
/// The remote version to normalise.
public string GetLocalVersionForUpdateChecks(string version)
{
return this.DataRecord.GetLocalVersionForUpdateChecks(version);
}
/// Get a semantic remote version for update checks.
/// The remote version to normalise.
public string GetRemoteVersionForUpdateChecks(string version)
{
return this.DataRecord.GetRemoteVersionForUpdateChecks(version);
}
}
}