Commit 095c85b
QuantityFormatter defaults to the "G" format (#1450)
- [x] `QuantityFormatter` defaults to the "G" format for null or empty
string
- [x] `QuantityFormatter` no longer supports the `U`/`V`/`Q` formats (an
exception is thrown)
- [x] `QuantityFormatter` explicitly throws for the `Cx`/`Px` formats
- [x] `QuantityFormatter` shouldn't throw for something like "P1: #.00"
(instead it should output something like "P1: 12.34 mg")
- [x] `QuantityFormatter` unless explicitly given an incorrect `Ax`
specifier, the `QuantityFormatter` uses the "default unit abbreviation"
- which maybe `string.Empty` (if none are defined for a given unit)
Fixes #1183
Duplicate of #1206
CC @tmilnthorp
---------
Co-authored-by: Andreas Gullberg Larsen <[email protected]>1 parent 50ba1c1 commit 095c85b
File tree
256 files changed
+1012
-868
lines changed- CodeGen/Generators/UnitsNetGen
- UnitsNet.Tests
- GeneratedCode/TestsBase
- UnitsNet
- GeneratedCode/Quantities
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
256 files changed
+1012
-868
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | | - | |
| 1173 | + | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | | - | |
| 1183 | + | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | | - | |
| 1194 | + | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| |||
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
1280 | | - | |
| 1280 | + | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments