You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UnitAbbreviationsCache.CreateDefault should use the default QuantityInfoLookup (#1548)
- `UnitAbbreviationsCache`: refactored the constructors / Create factory
methods, with the Map/Get methods throwing an exception for missing
units / unmapped abbreviations
- `UnitAbbreviationsCache`: replaced the `string[]` return types with
`IReadOnlyList` (breaking change for `.Length` which now becomes
`.Count`)
- `UnitAbbreviationsCache`: removed the overload accepting a `UnitInfo`
- `UnitParser`: optimized the unit-parsing-with-fallback-culture
methods, making the `FromUnitAbbreviation` behavior consistent with that
of `ParseUnit`
- `UnitParser`: `UnitInfo GetUnitFromAbbreviation(string
unitAbbreviation, IFormatProvider? formatProvider)` : flipped the
parameters and made the method public (_this is optional_)
- optimized the `Mass.ParseUnit` calls (avoiding the `UnitInfo` lookups)
- completed the coverage of the `UnitParser` and
`UnitAbbreviationsCache`
fixes#1509
0 commit comments