summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs
blob: 65fa424ec192a672509572cf40476b4ef4100e3f (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
34
35
36
37
38
namespace StardewModdingAPI.Toolkit.Framework.ModData
{
    /// <summary>The versioned fields from a <see cref="ModDataRecord"/> for a specific manifest.</summary>
    public class ModDataRecordVersionedFields
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The underlying data record.</summary>
        public ModDataRecord DataRecord { get; }

        /// <summary>The update key to apply (if any).</summary>
        public string? UpdateKey { get; set; }

        /// <summary>The predefined compatibility status.</summary>
        public ModStatus Status { get; set; } = ModStatus.None;

        /// <summary>A reason phrase for the <see cref="Status"/>, or <c>null</c> to use the default reason.</summary>
        public string? StatusReasonPhrase { get; set; }

        /// <summary>Technical details shown in TRACE logs for the <see cref="Status"/>, or <c>null</c> to omit it.</summary>
        public string? StatusReasonDetails { get; set; }

        /// <summary>The upper version for which the <see cref="Status"/> applies (if any).</summary>
        public ISemanticVersion? StatusUpperVersion { get; set; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="dataRecord">The underlying data record.</param>
        public ModDataRecordVersionedFields(ModDataRecord dataRecord)
        {
            this.DataRecord = dataRecord;
        }
    }
}