[Deps]Update Unitsnet to 5.50.0 (#32572)

* [DEPS] Update Unitsnet to 5.50.0

* [DEPS] Update Unitsnet to 5.50.0

* fix bug 1
This commit is contained in:
Jvr 2024-06-20 11:27:29 +02:00 committed by GitHub
parent aa977f7579
commit 1ae8327a43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
<PackageVersion Include="UnitsNet" Version="4.145.0" />
<PackageVersion Include="UnitsNet" Version="5.50.0" />
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />

View File

@ -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

View File

@ -44,13 +44,13 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
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;
}