From c58a29eafa231ff0b821361740ab8308c83e700c Mon Sep 17 00:00:00 2001
From: Jvr <109031036+Jvr2022@users.noreply.github.com>
Date: Mon, 22 Apr 2024 11:34:19 +0200
Subject: [PATCH 1/3] [DEPS] Update Unitsnet to 5.50.0
---
NOTICE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NOTICE.md b/NOTICE.md
index f42a4df47550..3a289fadbe66 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -1365,7 +1365,7 @@ EXHIBIT A -Mozilla Public License.
- System.ServiceProcess.ServiceController 8.0.0
- System.Text.Encoding.CodePages 8.0.0
- UnicodeInformation 2.6.0
-- UnitsNet 4.145.0
+- UnitsNet 5.50.0
- UTF.Unknown 2.5.1
- Vanara.PInvoke.Shell32 3.4.11
- Vanara.PInvoke.User32 3.4.11
From ea00f2dcbbf0ee1e546cf166bc9ac264987af388 Mon Sep 17 00:00:00 2001
From: Jvr <109031036+Jvr2022@users.noreply.github.com>
Date: Mon, 22 Apr 2024 11:37:18 +0200
Subject: [PATCH 2/3] [DEPS] Update Unitsnet to 5.50.0
---
Directory.Packages.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index f8e3aa9abaf8..b4f055575b58 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -85,7 +85,7 @@
-
+
@@ -97,4 +97,4 @@
-
\ No newline at end of file
+
From 2591829b97fab7d6f78348bb08075de6781f4316 Mon Sep 17 00:00:00 2001
From: Jvr <109031036+Jvr2022@users.noreply.github.com>
Date: Tue, 23 Apr 2024 12:54:56 +0200
Subject: [PATCH 3/3] fix bug 1
---
.../UnitHandler.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs
index a24e6fd90baf..5038c13a3ea0 100644
--- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs
+++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/UnitHandler.cs
@@ -44,13 +44,13 @@ private static Enum GetUnitEnum(string unit, QuantityInfo unitInfo)
return first.Value;
}
- if (UnitParser.Default.TryParse(unit, unitInfo.UnitType, out Enum enum_unit))
+ if (UnitsNetSetup.Default.UnitParser.TryParse(unit, unitInfo.UnitType, out Enum enum_unit))
{
return enum_unit;
}
var cultureInfoEnglish = new System.Globalization.CultureInfo("en-US");
- if (UnitParser.Default.TryParse(unit, unitInfo.UnitType, cultureInfoEnglish, out Enum enum_unit_en))
+ if (UnitsNetSetup.Default.UnitParser.TryParse(unit, unitInfo.UnitType, cultureInfoEnglish, out Enum enum_unit_en))
{
return enum_unit_en;
}