diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-12 19:15:39 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-12 19:15:39 -0400 |
commit | 0b48c1748b354458059c7607415288de072b01e9 (patch) | |
tree | f63fd950f565d363414eb692be9024895cdea174 /src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs | |
parent | 9fbed0fa1f28a9b0fe0b952a78b10e2d475adb03 (diff) | |
download | SMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.gz SMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.bz2 SMAPI-0b48c1748b354458059c7607415288de072b01e9.zip |
enable nullable annotations in the web project & related code (#837)
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs')
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs index 30e76d04..71c90d0c 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityInfo.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki { /// <summary>Compatibility info for a mod.</summary> @@ -9,18 +7,37 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki ** Accessors *********/ /// <summary>The compatibility status.</summary> - public WikiCompatibilityStatus Status { get; set; } + public WikiCompatibilityStatus Status { get; } /// <summary>The human-readable summary of the compatibility status or workaround, without HTML formatting.</summary> - public string Summary { get; set; } + public string? Summary { get; } - /// <summary>The game or SMAPI version which broke this mod (if applicable).</summary> - public string BrokeIn { get; set; } + /// <summary>The game or SMAPI version which broke this mod, if applicable.</summary> + public string? BrokeIn { get; } /// <summary>The version of the latest unofficial update, if applicable.</summary> - public ISemanticVersion UnofficialVersion { get; set; } + public ISemanticVersion? UnofficialVersion { get; } /// <summary>The URL to the latest unofficial update, if applicable.</summary> - public string UnofficialUrl { get; set; } + public string? UnofficialUrl { get; } + + + /********* + ** Accessors + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="status">The compatibility status.</param> + /// <param name="summary">The human-readable summary of the compatibility status or workaround, without HTML formatting.</param> + /// <param name="brokeIn">The game or SMAPI version which broke this mod, if applicable.</param> + /// <param name="unofficialVersion">The version of the latest unofficial update, if applicable.</param> + /// <param name="unofficialUrl">The URL to the latest unofficial update, if applicable.</param> + public WikiCompatibilityInfo(WikiCompatibilityStatus status, string? summary, string? brokeIn, ISemanticVersion? unofficialVersion, string? unofficialUrl) + { + this.Status = status; + this.Summary = summary; + this.BrokeIn = brokeIn; + this.UnofficialVersion = unofficialVersion; + this.UnofficialUrl = unofficialUrl; + } } } |