Commit 3e7a6fd
authored
UnitParser: adding overloads for getting a UnitInfo using a type/name and abbreviation (#1585)
Adding the following (public) methods to the `UnitParser`
- `UnitInfo GetUnitFromAbbreviation(string quantityName, string
unitAbbreviation, IFormatProvider? formatProvider)`
- `UnitInfo GetUnitFromAbbreviation(Type quantityType, string
unitAbbreviation, IFormatProvider? formatProvider)`
- `bool TryGetUnitFromAbbreviation(string quantityName, string?
unitAbbreviation, IFormatProvider? formatProvider, [NotNullWhen(true)]
out UnitInfo? unitInfo)`
- `bool TryGetUnitFromAbbreviation(Type quantityType, string?
unitAbbreviation, IFormatProvider? formatProvider, [NotNullWhen(true)]
out UnitInfo? unitInfo)`1 parent 0da4a5a commit 3e7a6fd
File tree
2 files changed
+466
-255
lines changed- UnitsNet.Tests
- UnitsNet/CustomCode
2 files changed
+466
-255
lines changed
0 commit comments