summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/Program.cs
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.Installer/Program.cs
parent29f909a8d5dbb83d6df1a54d2680e6f9898f3b19 (diff)
downloadSMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.gz
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.bz2
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.zip
use target-typed new
Diffstat (limited to 'src/SMAPI.Installer/Program.cs')
-rw-r--r--src/SMAPI.Installer/Program.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI.Installer/Program.cs b/src/SMAPI.Installer/Program.cs
index 45cfea75..2c9b2c0a 100644
--- a/src/SMAPI.Installer/Program.cs
+++ b/src/SMAPI.Installer/Program.cs
@@ -31,7 +31,7 @@ namespace StardewModdingApi.Installer
public static void Main(string[] args)
{
// find install bundle
- FileInfo zipFile = new FileInfo(Path.Combine(Program.InstallerPath, "install.dat"));
+ FileInfo zipFile = new(Path.Combine(Program.InstallerPath, "install.dat"));
if (!zipFile.Exists)
{
Console.WriteLine($"Oops! Some of the installer files are missing; try re-downloading the installer. (Missing file: {zipFile.FullName})");
@@ -40,7 +40,7 @@ namespace StardewModdingApi.Installer
}
// unzip bundle into temp folder
- DirectoryInfo bundleDir = new DirectoryInfo(Program.ExtractedBundlePath);
+ DirectoryInfo bundleDir = new(Program.ExtractedBundlePath);
Console.WriteLine("Extracting install files...");
ZipFile.ExtractToDirectory(zipFile.FullName, bundleDir.FullName);
@@ -70,7 +70,7 @@ namespace StardewModdingApi.Installer
{
try
{
- AssemblyName name = new AssemblyName(e.Name);
+ AssemblyName name = new(e.Name);
foreach (FileInfo dll in new DirectoryInfo(Program.InternalFilesPath).EnumerateFiles("*.dll"))
{
if (name.Name.Equals(AssemblyName.GetAssemblyName(dll.FullName).Name, StringComparison.OrdinalIgnoreCase))