diff --git a/WinAppSdkCleaner/Models/Model.cs b/WinAppSdkCleaner/Models/Model.cs index b8d7172..4627361 100644 --- a/WinAppSdkCleaner/Models/Model.cs +++ b/WinAppSdkCleaner/Models/Model.cs @@ -24,8 +24,7 @@ private static void AddUnknownSdkVersions(List versions, List p.Id.Version)) { - PackageVersion pv = package.Id.Version; - versions.Add(new VersionRecord(string.Empty, pv)); + versions.Add(new VersionRecord(string.Empty, package.Id.Version)); } } } diff --git a/WinAppSdkCleaner/Models/PackageRecord.cs b/WinAppSdkCleaner/Models/PackageRecord.cs index 46d1cec..d6b5530 100644 --- a/WinAppSdkCleaner/Models/PackageRecord.cs +++ b/WinAppSdkCleaner/Models/PackageRecord.cs @@ -1,3 +1,3 @@ namespace WinAppSdkCleaner.Models; -internal record class PackageRecord(Package Package, List PackagesDependentOnThis, int Depth = 0); +internal sealed record class PackageRecord(Package Package, List PackagesDependentOnThis, int Depth = 0); diff --git a/WinAppSdkCleaner/Models/Settings.cs b/WinAppSdkCleaner/Models/Settings.cs index 221d333..b680369 100644 --- a/WinAppSdkCleaner/Models/Settings.cs +++ b/WinAppSdkCleaner/Models/Settings.cs @@ -60,7 +60,7 @@ public int TimeoutPerPackage private T Getter([CallerMemberName] string name = "") => (T)this[name]; - private void Setter(T value, [CallerMemberName] string name = "") => this[name] = value; + private void Setter(object value, [CallerMemberName] string name = "") => this[name] = value; public override void Save() { diff --git a/WinAppSdkCleaner/Views/SdkView.xaml b/WinAppSdkCleaner/Views/SdkView.xaml index b27890e..2a532d4 100644 --- a/WinAppSdkCleaner/Views/SdkView.xaml +++ b/WinAppSdkCleaner/Views/SdkView.xaml @@ -28,7 +28,7 @@ - +