From 81d5e989bef79b9642ca170c7c3a347c1596e2a6 Mon Sep 17 00:00:00 2001 From: Thomas Nieto <38873752+ThomasNieto@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:02:52 -0500 Subject: [PATCH] Fix formatting (#33) --- src/code/Init.cs | 2 +- src/code/MsuProvider.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code/Init.cs b/src/code/Init.cs index 5a6b8a4..95c1ecd 100644 --- a/src/code/Init.cs +++ b/src/code/Init.cs @@ -11,7 +11,7 @@ namespace AnyPackage.Provider.Msu; public sealed class Init : IModuleAssemblyInitializer, IModuleAssemblyCleanup { - private readonly Guid _id = new Guid("314633fe-c7e9-4eeb-824b-382a8a4e92b8"); + private readonly Guid _id = new("314633fe-c7e9-4eeb-824b-382a8a4e92b8"); public void OnImport() { diff --git a/src/code/MsuProvider.cs b/src/code/MsuProvider.cs index a5db749..38d63ac 100644 --- a/src/code/MsuProvider.cs +++ b/src/code/MsuProvider.cs @@ -13,7 +13,7 @@ namespace AnyPackage.Provider.Msu; -[PackageProvider("Msu", PackageByName = false, FileExtensions = new string[] { ".msu" })] +[PackageProvider("Msu", PackageByName = false, FileExtensions = [".msu"])] public sealed class MsuProvider : PackageProvider, IFindPackage, IGetPackage, IInstallPackage, IUninstallPackage { public void FindPackage(PackageRequest request) @@ -28,12 +28,12 @@ public void FindPackage(PackageRequest request) } string line; - Dictionary metadata = new Dictionary(); + Dictionary metadata = []; using var reader = file.OpenText(); while ((line = reader.ReadLine()) is not null) { - var values = line.Split(new char[] { '=' }, 2); + var values = line.Split(['='], 2); var key = values[0].Replace(" ", ""); // Remove quotes around value