diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
commit | c8ad50dad1d706a1901798f9396f6becfea36c0e (patch) | |
tree | 28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI.Web/Framework/ConfigModels | |
parent | 451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff) | |
parent | f78093bdb58d477b400cde3f19b70ffd6ddf833d (diff) | |
download | SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2 SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Framework/ConfigModels')
5 files changed, 32 insertions, 28 deletions
diff --git a/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs index 878130bf..b582b2b0 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs @@ -10,17 +10,17 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels ** Generic ****/ /// <summary>The user agent for API clients, where {0} is the SMAPI version.</summary> - public string UserAgent { get; set; } + public string UserAgent { get; set; } = null!; /**** ** Azure ****/ /// <summary>The connection string for the Azure Blob storage account.</summary> - public string AzureBlobConnectionString { get; set; } + public string? AzureBlobConnectionString { get; set; } /// <summary>The Azure Blob container in which to store temporary uploaded logs.</summary> - public string AzureBlobTempContainer { get; set; } + public string AzureBlobTempContainer { get; set; } = null!; /// <summary>The number of days since the blob's last-modified date when it will be deleted.</summary> public int AzureBlobTempExpiryDays { get; set; } @@ -30,65 +30,65 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels ** Chucklefish ****/ /// <summary>The base URL for the Chucklefish mod site.</summary> - public string ChucklefishBaseUrl { get; set; } + public string ChucklefishBaseUrl { get; set; } = null!; /// <summary>The URL for a mod page on the Chucklefish mod site excluding the <see cref="GitHubBaseUrl"/>, where {0} is the mod ID.</summary> - public string ChucklefishModPageUrlFormat { get; set; } + public string ChucklefishModPageUrlFormat { get; set; } = null!; /**** ** CurseForge ****/ /// <summary>The base URL for the CurseForge API.</summary> - public string CurseForgeBaseUrl { get; set; } + public string CurseForgeBaseUrl { get; set; } = null!; /**** ** GitHub ****/ /// <summary>The base URL for the GitHub API.</summary> - public string GitHubBaseUrl { get; set; } + public string GitHubBaseUrl { get; set; } = null!; /// <summary>The Accept header value expected by the GitHub API.</summary> - public string GitHubAcceptHeader { get; set; } + public string GitHubAcceptHeader { get; set; } = null!; /// <summary>The username with which to authenticate to the GitHub API (if any).</summary> - public string GitHubUsername { get; set; } + public string? GitHubUsername { get; set; } /// <summary>The password with which to authenticate to the GitHub API (if any).</summary> - public string GitHubPassword { get; set; } + public string? GitHubPassword { get; set; } /**** ** ModDrop ****/ /// <summary>The base URL for the ModDrop API.</summary> - public string ModDropApiUrl { get; set; } + public string ModDropApiUrl { get; set; } = null!; /// <summary>The URL for a ModDrop mod page for the user, where {0} is the mod ID.</summary> - public string ModDropModPageUrl { get; set; } + public string ModDropModPageUrl { get; set; } = null!; /**** ** Nexus Mods ****/ /// <summary>The base URL for the Nexus Mods API.</summary> - public string NexusBaseUrl { get; set; } + public string NexusBaseUrl { get; set; } = null!; /// <summary>The URL for a Nexus mod page for the user, excluding the <see cref="NexusBaseUrl"/>, where {0} is the mod ID.</summary> - public string NexusModUrlFormat { get; set; } + public string NexusModUrlFormat { get; set; } = null!; /// <summary>The URL for a Nexus mod page to scrape for versions, excluding the <see cref="NexusBaseUrl"/>, where {0} is the mod ID.</summary> - public string NexusModScrapeUrlFormat { get; set; } + public string NexusModScrapeUrlFormat { get; set; } = null!; /// <summary>The Nexus API authentication key.</summary> - public string NexusApiKey { get; set; } + public string? NexusApiKey { get; set; } /**** ** Pastebin ****/ /// <summary>The base URL for the Pastebin API.</summary> - public string PastebinBaseUrl { get; set; } + public string PastebinBaseUrl { get; set; } = null!; } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs index f382d7b5..e46ecf2b 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs @@ -4,12 +4,12 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels internal class ModOverrideConfig { /// <summary>The unique ID from the mod's manifest.</summary> - public string ID { get; set; } + public string ID { get; set; } = null!; /// <summary>Whether to allow non-standard versions.</summary> public bool AllowNonStandardVersions { get; set; } /// <summary>The mod page URL to use regardless of which site has the update, or <c>null</c> to use the site URL.</summary> - public string SetUrl { get; set; } + public string? SetUrl { get; set; } } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs index aea695b8..c3b136e8 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs @@ -1,3 +1,5 @@ +using System; + namespace StardewModdingAPI.Web.Framework.ConfigModels { /// <summary>The config settings for mod update checks.</summary> @@ -6,16 +8,16 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /********* ** Accessors *********/ - /// <summary>The number of minutes successful update checks should be cached before refetching them.</summary> + /// <summary>The number of minutes successful update checks should be cached before re-fetching them.</summary> public int SuccessCacheMinutes { get; set; } - /// <summary>The number of minutes failed update checks should be cached before refetching them.</summary> + /// <summary>The number of minutes failed update checks should be cached before re-fetching them.</summary> public int ErrorCacheMinutes { get; set; } /// <summary>Update-check metadata to override.</summary> - public ModOverrideConfig[] ModOverrides { get; set; } + public ModOverrideConfig[] ModOverrides { get; set; } = Array.Empty<ModOverrideConfig>(); /// <summary>The update-check config for SMAPI's own update checks.</summary> - public SmapiInfoConfig SmapiInfo { get; set; } + public SmapiInfoConfig SmapiInfo { get; set; } = null!; } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs index 664dbef3..62685e47 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs @@ -7,9 +7,9 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels ** Accessors *********/ /// <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; set; } + public string? OtherBlurb { get; set; } /// <summary>A list of supports to credit on the main page, in Markdown format.</summary> - public string SupporterList { get; set; } + public string? SupporterList { get; set; } } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/SmapiInfoConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/SmapiInfoConfig.cs index d69fabb3..a95e0048 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/SmapiInfoConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/SmapiInfoConfig.cs @@ -1,15 +1,17 @@ +using System; + namespace StardewModdingAPI.Web.Framework.ConfigModels { /// <summary>The update-check config for SMAPI's own update checks.</summary> internal class SmapiInfoConfig { /// <summary>The mod ID used for SMAPI update checks.</summary> - public string ID { get; set; } + public string ID { get; set; } = null!; /// <summary>The default update key used for SMAPI update checks.</summary> - public string DefaultUpdateKey { get; set; } + public string DefaultUpdateKey { get; set; } = null!; /// <summary>The update keys to add for SMAPI update checks when the player has a beta version installed.</summary> - public string[] AddBetaUpdateKeys { get; set; } + public string[] AddBetaUpdateKeys { get; set; } = Array.Empty<string>(); } } |