-
Notifications
You must be signed in to change notification settings - Fork 396
refactor: rename to Quantity.DefaultProvider.Quantities #1576
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
Conversation
Optionally merge #1575 first, this PR has both changes. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1576 +/- ##
======================================
Coverage 93% 93%
======================================
Files 311 311
Lines 28780 28781 +1
======================================
+ Hits 26863 26864 +1
Misses 1917 1917 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
UnitsNet/QuantityInfoLookup.cs
Outdated
@@ -23,7 +23,7 @@ namespace UnitsNet; | |||
/// </remarks> | |||
internal class QuantityInfoLookup | |||
{ | |||
private readonly QuantityInfo[] _quantities; | |||
private readonly IReadOnlyList<QuantityInfo> _quantities; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a slight performance overhead of using the interface on the private field, but if you prefer clarity- it's fine by me..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was collateral damage, I'll revert it. The idea was to accept IReadOnlyList as input and reuse instance if compatible, but I'll do the same for array instead.
Ok, i'm fine with the static initializer- we'll change it back when we start actually configuring the defaults.. |
Sounds good |
Fixup of #1555