summaryrefslogtreecommitdiff
path: root/src/SMAPI.Models/ModSeachModel.cs
blob: 526fbaf3fc40653487aa90494d3b27d2769545c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections.Generic;
using System.Linq;

namespace StardewModdingAPI.Models
{
    /// <summary>Specifies mods whose update-check info to fetch.</summary>
    internal class ModSearchModel
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The namespaced mod keys to search.</summary>
        public string[] ModKeys { get; set; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an empty instance.</summary>
        /// <remarks>This constructed is needed for JSON deserialisation.</remarks>
        public ModSearchModel() { }

        /// <summary>Construct an valid instance.</summary>
        /// <param name="modKeys">The namespaced mod keys to search.</param>
        public ModSearchModel(IEnumerable<string> modKeys)
        {
            this.ModKeys = modKeys.ToArray();
        }
    }
}