Skip to content
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

Access modifier on UnitsNetSetup.Default.QuantityParser is non-public #1427

Closed
gmkado opened this issue Oct 4, 2024 · 4 comments
Closed

Comments

@gmkado
Copy link

gmkado commented Oct 4, 2024

QuantityParser.Default has an obsolete attribute with message "Use UnitsNetSetup.Default.QuantityParser instead", but this field is internal. What is the recommended way to access the QuantityParser?

https://github.com/angularsen/UnitsNet/blob/e08025456013d6a4826f1bd6c3276d7a43560836/UnitsNet/CustomCode/QuantityParser.cs#L40C46-L40C61

@lipchev
Copy link
Collaborator

lipchev commented Oct 15, 2024

@angularsen In my upcoming proposal for v6 I've prepared some extensions for configuring the UnitsNetSetup, which (IMO) don't require us to remove the UnitParser.Default, QuantityParser.Default etc.. I personally think those are still useful (the access via UnitsNetSetup.Default is pretty verbose)..

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link

This issue was automatically closed due to inactivity.

@angularsen
Copy link
Owner

angularsen commented Dec 30, 2024

UnitsNetSetup.QuantityParser was changed from internal to public, in both v5 and v6.
52aba98

Also, we decided to keep the static Default getters, like QuantityParser.Default for convenience.
#1480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants