summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r--src/SMAPI.Web/Controllers/IndexController.cs2
-rw-r--r--src/SMAPI.Web/Controllers/JsonValidatorController.cs2
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs
index 5097997c..69b54f47 100644
--- a/src/SMAPI.Web/Controllers/IndexController.cs
+++ b/src/SMAPI.Web/Controllers/IndexController.cs
@@ -94,7 +94,7 @@ namespace StardewModdingAPI.Web.Controllers
// strip 'noinclude' blocks from release description
if (release != null)
{
- HtmlDocument doc = new HtmlDocument();
+ HtmlDocument doc = new();
doc.LoadHtml(release.Body);
foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//*[@class='noinclude']")?.ToArray() ?? Array.Empty<HtmlNode>())
node.Remove();
diff --git a/src/SMAPI.Web/Controllers/JsonValidatorController.cs b/src/SMAPI.Web/Controllers/JsonValidatorController.cs
index e06c1236..bcd4097a 100644
--- a/src/SMAPI.Web/Controllers/JsonValidatorController.cs
+++ b/src/SMAPI.Web/Controllers/JsonValidatorController.cs
@@ -197,7 +197,7 @@ namespace StardewModdingAPI.Web.Controllers
return null;
// get matching file
- DirectoryInfo schemaDir = new DirectoryInfo(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "schemas"));
+ DirectoryInfo schemaDir = new(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "schemas"));
foreach (FileInfo file in schemaDir.EnumerateFiles("*.json"))
{
if (file.Name.Equals($"{id}.json"))
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index dfe2504b..5329df99 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -135,7 +135,7 @@ namespace StardewModdingAPI.Web.Controllers
bool isSmapiBeta = apiVersion.IsPrerelease() && apiVersion.PrereleaseTag.StartsWith("beta");
// get latest versions
- ModEntryModel result = new ModEntryModel { ID = search.ID };
+ ModEntryModel result = new() { ID = search.ID };
IList<string> errors = new List<string>();
ModEntryVersionModel main = null;
ModEntryVersionModel optional = null;