Replies: 1 comment
-
I think you are correct, if you are mostly using it dynamically from a table lookup, UnitsNet will not offer all that much benefit. Static typing of compiled units is its strongest feature. Some more information on what you can and can't do with custom units in the wiki here: https://github.com/angularsen/UnitsNet/wiki/Extending-with-Custom-Units This may improve in the future, but there is no momentum in that direction as of today. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've got the need to handle varying unit types and quantities in our database. By in large, the unitsdotnet will support just about every typical unit type (and tons of unit types that we'll likely never need to support). I realize serialization supports xmlk/json, but I was hoping to just store unittype, and unitqty where unittype points at a table that has a unit category, unit type, conversion factors etc.
We do have a requirement to be able to store custom unit types, and potentially have users define conversion factors.
After looking at unitsdotnet, it looks like its very well setup for Dynamic and Custom unit types and even allowing configuration of conversion factors etc... but more implemented in code, and at compile time.
It seems like based on our requirements, there may not be a ton we can use UnitsDotNet for, that trying to use it for these use cases may actually be harder/worse than just building something from scratch, but wanted to solicit other opinions incase I've missed something in the documentation.
Beta Was this translation helpful? Give feedback.
All reactions