UnitsNet icon indicating copy to clipboard operation
UnitsNet copied to clipboard

Access modifier on `UnitsNetSetup.Default.QuantityParser` is non-public

Open gmkado opened this issue 1 year ago • 1 comments

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

gmkado avatar Oct 04 '24 20:10 gmkado

@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)..

lipchev avatar Oct 15 '24 12:10 lipchev

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.

github-actions[bot] avatar Nov 15 '24 02:11 github-actions[bot]

This issue was automatically closed due to inactivity.

github-actions[bot] avatar Nov 22 '24 02:11 github-actions[bot]

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

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

angularsen avatar Dec 30 '24 21:12 angularsen