summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
commita593eda30f82af474887d91458b0e9158f66fefc (patch)
tree8aa0e0586e3cce7627e8c4ff445a953665953f8f /src/SMAPI.Web/Framework/Clients
parent29f909a8d5dbb83d6df1a54d2680e6f9898f3b19 (diff)
downloadSMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.gz
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.bz2
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.zip
use target-typed new
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients')
-rw-r--r--src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs2
-rw-r--r--src/SMAPI.Web/Framework/Clients/CurseForge/CurseForgeClient.cs2
-rw-r--r--src/SMAPI.Web/Framework/Clients/Nexus/NexusClient.cs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs
index b8b05878..9689807c 100644
--- a/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs
@@ -90,7 +90,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.Chucklefish
/// <param name="id">The mod ID.</param>
private string GetModUrl(uint id)
{
- UriBuilder builder = new UriBuilder(this.Client.BaseClient.BaseAddress);
+ UriBuilder builder = new(this.Client.BaseClient.BaseAddress);
builder.Path += string.Format(this.ModPageUrlFormat, id);
return builder.Uri.ToString();
}
diff --git a/src/SMAPI.Web/Framework/Clients/CurseForge/CurseForgeClient.cs b/src/SMAPI.Web/Framework/Clients/CurseForge/CurseForgeClient.cs
index d8008721..50a3336d 100644
--- a/src/SMAPI.Web/Framework/Clients/CurseForge/CurseForgeClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/CurseForge/CurseForgeClient.cs
@@ -17,7 +17,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.CurseForge
private readonly IClient Client;
/// <summary>A regex pattern which matches a version number in a CurseForge mod file name.</summary>
- private readonly Regex VersionInNamePattern = new Regex(@"^(?:.+? | *)v?(\d+\.\d+(?:\.\d+)?(?:-.+?)?) *(?:\.(?:zip|rar|7z))?$", RegexOptions.Compiled);
+ private readonly Regex VersionInNamePattern = new(@"^(?:.+? | *)v?(\d+\.\d+(?:\.\d+)?(?:-.+?)?) *(?:\.(?:zip|rar|7z))?$", RegexOptions.Compiled);
/*********
diff --git a/src/SMAPI.Web/Framework/Clients/Nexus/NexusClient.cs b/src/SMAPI.Web/Framework/Clients/Nexus/NexusClient.cs
index 4ba94f81..571f06bc 100644
--- a/src/SMAPI.Web/Framework/Clients/Nexus/NexusClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/Nexus/NexusClient.cs
@@ -195,7 +195,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.Nexus
/// <param name="id">The mod ID.</param>
private string GetModUrl(uint id)
{
- UriBuilder builder = new UriBuilder(this.WebClient.BaseClient.BaseAddress);
+ UriBuilder builder = new(this.WebClient.BaseClient.BaseAddress);
builder.Path += string.Format(this.WebModUrlFormat, id);
return builder.Uri.ToString();
}