using System.Collections.Generic; using System.Linq; namespace StardewModdingAPI.Common.Models { /// Specifies mods whose update-check info to fetch. internal class ModSearchModel { /********* ** Accessors *********/ /// The namespaced mod keys to search. public string[] ModKeys { get; set; } /// Whether to allow non-semantic versions, instead of returning an error for those. public bool AllowInvalidVersions { get; set; } /********* ** Public methods *********/ /// Construct an empty instance. public ModSearchModel() { // needed for JSON deserialising } /// Construct an instance. /// The namespaced mod keys to search. /// Whether to allow non-semantic versions, instead of returning an error for those. public ModSearchModel(IEnumerable modKeys, bool allowInvalidVersions) { this.ModKeys = modKeys.ToArray(); this.AllowInvalidVersions = allowInvalidVersions; } } }