-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changes - Remove `QuantityValue`, replaced with `double` - Remove `TValueType` from interfaces - Remove `IQuantity<TUnitType, out TValueType>` - Remove `IValueQuantity<out TValueType>` - Change `IQuantity<TSelf, TUnitType, out TValueType>` to `IQuantity<TSelf, TUnitType>` - Change `IArithmeticQuantity<TSelf, TUnitType, TValueType>` to `IArithmeticQuantity<TSelf, TUnitType>` ### Changes to UnitsNet.Serialiation.JsonNet - Deserializing previously serialized JSON for decimal quantities `Information`, `BitRate` and `Power` still work, but it now reads just `double Value` property and ignores `string ValueString` and `string ValueType` properties. This may lose precision compared to preserving the full `decimal` value, but `decimal` is no longer supported in v6. ### Background In #1195 @angularsen says: > If we change all 3 quantities to double, we have the potential to clean up a LOT of QuantityValue complexity. This made me wonder how deep that complexity goes so I decided to experiment, and this is the result. I must say some of these changes make me a bit sad. A lot of work and some very clever thinking went into supporting multiple numerical types, and I want to acknowledge that. 🙇 Also, I took it as far as possible but that might not be the best outcome, for example we might want to keep deserialization support. This just demonstrates a possible direction we could go in. --------- Co-authored-by: Andreas Gullberg Larsen <andreas.larsen84@gmail.com>
- Loading branch information
1 parent
aeb0cd7
commit 1d644f8
Showing
280 changed files
with
3,761 additions
and
8,973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.