-
Notifications
You must be signed in to change notification settings - Fork 397
QuantityValue implemented as a fractional number 🐲 #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- IQuantity interfaces optimized (some methods refactored as extensions) - QuantityInfo/UnitInfo hierachy re-implemented (same properties, different constructors) - QuantityInfoLookup is now public - UntAbbreviationsCache, UnitParser, QuantityParser optimized - UnitConverter: re-implemented (multiple versions) - removed the IConvertible interface - updated the JsonNet converters - introducing the SystemTextJson project - added a new UnitsNetConfiguration to the Samples project showcasing the new configuration options - many more tests and benchmarks (perhaps too many)
@angularsen Clearly, I don't expect this to get merged in the Gitty up! fashion, but at least we have the whole picture, with sources that I can reference. If you want, send me an e-mail, we could do a quick walk-through / discussion. |
…lection constructors with IEnumerable - `UnitAbbreviationsCacheInitializationBenchmarks`: replaced some obsolete usages
I tried to create this PR twice before (many months ago), while the changes to the unit definitions were still not merged- and the web interface was giving me an error when trying to browse the files changed.. Something like "Too many files to display" 😄 |
Ok, I'm not going to get through a review of this many files anytime soon. On the surface though, it seems like this could be split up into chunks. I know it's tedious and extra work, but it will be way faster to review. Do you see any chunks of changes to easily split off into separate PRs? |
Sofia (GMT+3), but time zones are not relevant to my sleep schedule - so basically any time you want.
Yes, I do have some ideas:
Hopefully by the time we get to 5) you'd be up to speed (and fed up with PRs) and we can turn back to reviewing / working on the rest of it as a whole 😄 |
Ok, sounds good. Just send PRs my way and I'll try to get to them. I have a little bit of extra time this weekend. |
…ions into their own folder
- UnitAbbreviationsCache: removing the obsolete overload - adding a few more tests
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR was automatically closed due to inactivity. |
…ramework (net8.0) with 9.0 on the QuantityInfoBenchmarks
@angularsen I've synced the changes with the main branch, updated the header-comment and the task-list. |
Great! I may have some time this weekend to look at it. |
…nused constructors of the UnitInfo
@angularsen By removing the |
With #1543 there should be a new |
… officially published nugget)
…of the official nugget version: 6.0.0-pre017)
@angularsen FYI - I'm keeping the nugget version in this PR one step ahead of the official pre-release version so that the nugget references in the Samples projects pick up the right one (same goes for my nugget sources). PS Before running the Samples, make sure you have built the Artifacts (from the global build script). |
- replaced the type of the tolerance parameter of the Equals extension with the concrete quantity type
…evant usages from the benchmarks
…l in net8+ - cleaning up some of the old benchmarks
QuantityValue
implemented as a fractional numberIQuantity
interfaces optimized (some methods refactored as extensions)UnitInfo
: introduced two new properties:ConversionFromBase
andConversionToBase
which are used instead of theswitch(Unit)
conversionQuantityInfoLookup
is now publicUnitsNetSetup
: introduced helper methods for adding external quantities, or re-configuring one or more of the existing onesUntAbbreviationsCache
: introduced additional factory methods (using a configuration delegate)UnitParser
: introduced additional factory methods (using a configuration delegate)UnitConverter
: re-implemented (multiple versions)Inverse
relationship mapping implemented as a type of implicit conversion