summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/ViewModels/IndexModel.cs
blob: 098f18cc73157188cdef17a6105d68139d85ae99 (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
31
32
33
namespace StardewModdingAPI.Web.ViewModels
{
    /// <summary>The view model for the index page.</summary>
    public class IndexModel
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The latest stable SMAPI version.</summary>
        public IndexVersionModel StableVersion { get; }

        /// <summary>A message to show below the download button (e.g. for details on downloading a beta version), in Markdown format.</summary>
        public string? OtherBlurb { get; }

        /// <summary>A list of supports to credit on the main page, in Markdown format.</summary>
        public string? SupporterList { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="stableVersion">The latest stable SMAPI version.</param>
        /// <param name="otherBlurb">A message to show below the download button (e.g. for details on downloading a beta version), in Markdown format.</param>
        /// <param name="supporterList">A list of supports to credit on the main page, in Markdown format.</param>
        internal IndexModel(IndexVersionModel stableVersion, string? otherBlurb, string? supporterList)
        {
            this.StableVersion = stableVersion;
            this.OtherBlurb = otherBlurb;
            this.SupporterList = supporterList;
        }
    }
}