qol: simplify and Tuple.Create()

This commit is contained in:
Gary Sharp
2025-07-20 15:58:42 +10:00
parent 4c27b0ff3c
commit fd43d85778
17 changed files with 138 additions and 138 deletions
+3 -3
View File
@@ -519,7 +519,7 @@ namespace Disco.Services.Plugins
var fileDateCheck = File.GetLastWriteTime(resourcePath);
if (fileDateCheck == resourceHash.Item2)
#endif
return new Tuple<string, string>(resourcePath, resourceHash.Item1);
return Tuple.Create(resourcePath, resourceHash.Item1);
}
if (!File.Exists(resourcePath))
@@ -532,12 +532,12 @@ namespace Disco.Services.Plugins
using (SHA256 sha = SHA256.Create())
{
byte[] hash = sha.ComputeHash(fileBytes);
resourceHash = new Tuple<string, DateTime>(HttpServerUtility.UrlTokenEncode(hash), fileDate);
resourceHash = Tuple.Create(HttpServerUtility.UrlTokenEncode(hash), fileDate);
}
}
WebResourceHashes[resourceKey] = resourceHash;
return new Tuple<string, string>(resourcePath, resourceHash.Item1);
return Tuple.Create(resourcePath, resourceHash.Item1);
}
public string WebResourceUrl(string Resource)
{