summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Storage
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/Storage
parent29f909a8d5dbb83d6df1a54d2680e6f9898f3b19 (diff)
downloadSMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.gz
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.bz2
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.zip
use target-typed new
Diffstat (limited to 'src/SMAPI.Web/Framework/Storage')
-rw-r--r--src/SMAPI.Web/Framework/Storage/StorageProvider.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI.Web/Framework/Storage/StorageProvider.cs b/src/SMAPI.Web/Framework/Storage/StorageProvider.cs
index c6f8bac1..1104df89 100644
--- a/src/SMAPI.Web/Framework/Storage/StorageProvider.cs
+++ b/src/SMAPI.Web/Framework/Storage/StorageProvider.cs
@@ -103,7 +103,7 @@ namespace StardewModdingAPI.Web.Framework.Storage
// fetch file
Response<BlobDownloadInfo> response = await blob.DownloadAsync();
using BlobDownloadInfo result = response.Value;
- using StreamReader reader = new StreamReader(result.Content);
+ using StreamReader reader = new(result.Content);
DateTimeOffset expiry = result.Details.LastModified + TimeSpan.FromDays(this.ExpiryDays);
string content = this.GzipHelper.DecompressString(reader.ReadToEnd());
@@ -130,7 +130,7 @@ namespace StardewModdingAPI.Web.Framework.Storage
else
{
// get file
- FileInfo file = new FileInfo(this.GetDevFilePath(id));
+ FileInfo file = new(this.GetDevFilePath(id));
if (file.Exists && file.LastWriteTimeUtc.AddDays(this.ExpiryDays) < DateTime.UtcNow) // expired
file.Delete();
if (!file.Exists)