summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Extensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Framework/Extensions.cs')
-rw-r--r--src/SMAPI.Web/Framework/Extensions.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SMAPI.Web/Framework/Extensions.cs b/src/SMAPI.Web/Framework/Extensions.cs
index 5305b142..a72c12c1 100644
--- a/src/SMAPI.Web/Framework/Extensions.cs
+++ b/src/SMAPI.Web/Framework/Extensions.cs
@@ -1,3 +1,5 @@
+#nullable disable
+
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Html;
@@ -29,7 +31,7 @@ namespace StardewModdingAPI.Web.Framework
public static string PlainAction(this IUrlHelper helper, [AspMvcAction] string action, [AspMvcController] string controller, object values = null, bool absoluteUrl = false)
{
// get route values
- RouteValueDictionary valuesDict = new RouteValueDictionary(values);
+ RouteValueDictionary valuesDict = new(values);
foreach (var value in helper.ActionContext.RouteData.Values)
{
if (!valuesDict.ContainsKey(value.Key))
@@ -45,7 +47,7 @@ namespace StardewModdingAPI.Web.Framework
if (absoluteUrl)
{
HttpRequest request = helper.ActionContext.HttpContext.Request;
- Uri baseUri = new Uri($"{request.Scheme}://{request.Host}");
+ Uri baseUri = new($"{request.Scheme}://{request.Host}");
url = new Uri(baseUri, url).ToString();
}