diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperException.cs b/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperException.cs index 672ea65..d8c96ba 100644 --- a/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperException.cs +++ b/DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperException.cs @@ -2,8 +2,5 @@ namespace DotnetRuntimeBootstrapper.AppHost.Core; -public class BootstrapperException : Exception -{ - public BootstrapperException(string message, Exception? innerException = null) - : base(message, innerException) { } -} +public class BootstrapperException(string message, Exception? innerException = null) + : Exception(message, innerException); diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Platform/OperatingSystemEx.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Platform/OperatingSystemEx.cs index bf5486d..9f6e58b 100644 --- a/DotnetRuntimeBootstrapper.AppHost.Core/Platform/OperatingSystemEx.cs +++ b/DotnetRuntimeBootstrapper.AppHost.Core/Platform/OperatingSystemEx.cs @@ -37,5 +37,5 @@ public static IEnumerable GetInstalledUpdates() } } - public static void Reboot() => CommandLine.Run("shutdown", new[] { "/r", "/t", "0" }); + public static void Reboot() => CommandLine.Run("shutdown", ["/r", "/t", "0"]); } diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/ExecutablePrerequisiteInstaller.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/ExecutablePrerequisiteInstaller.cs index c55f350..421f8b6 100644 --- a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/ExecutablePrerequisiteInstaller.cs +++ b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/ExecutablePrerequisiteInstaller.cs @@ -14,11 +14,7 @@ public PrerequisiteInstallerResult Run() { try { - var exitCode = CommandLine.Run( - FilePath, - new[] { "/install", "/quiet", "/norestart" }, - true - ); + var exitCode = CommandLine.Run(FilePath, ["/install", "/quiet", "/norestart"], true); // https://github.com/Tyrrrz/DotnetRuntimeBootstrapper/issues/24#issuecomment-1021447102 if (exitCode is 3010 or 3011 or 1641) diff --git a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdatePrerequisiteInstaller.cs b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdatePrerequisiteInstaller.cs index d13d813..9485bd1 100644 --- a/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdatePrerequisiteInstaller.cs +++ b/DotnetRuntimeBootstrapper.AppHost.Core/Prerequisites/WindowsUpdatePrerequisiteInstaller.cs @@ -14,11 +14,7 @@ public PrerequisiteInstallerResult Run() { try { - var exitCode = CommandLine.Run( - "wusa", - new[] { FilePath, "/quiet", "/norestart" }, - true - ); + var exitCode = CommandLine.Run("wusa", [FilePath, "/quiet", "/norestart"], true); // https://github.com/Tyrrrz/DotnetRuntimeBootstrapper/issues/24#issuecomment-1021447102 if (exitCode is 3010 or 3011 or 1641)