Commit 9574d47
authored
v5 Release (#982)
Fixes #180
Merging the v5 release branch.
It is still in alpha, but it is functional, nugets are published and there are not many planned breaking changes left.
By merging, all efforts moving forward are targeting v5 and this reduces friction:
- No more merge conflicts trying to forward port all changes to v5, instead cherry pick new units and fixes to v4 until v5 is fully stable.
- Contributors are having trouble building v4 locally due to `net40`, `net47` and Windows Runtime Component targets.
## 💥 Breaking changes
Default number format should be CultureInfo.CurrentCulture, not CurrentUICulture (#795)
Use CurrentCulture rather than CurrentUICulture (#986)
Return `QuantityValue` in `IQuantity` properties instead of `double` (#1074)
Return `decimal` in properties of `Power`, `BitRate` and `Information` quantities (#1074)
Fix singular name VolumeFlow.MillionUsGallonsPerDay
## 🔥 Removed
Remove targets: net40, net47, Windows Runtime Component.
Remove `Undefined` enum value for all unit enum types
Remove QuantityType enum
Remove IQuantity.Units and .UnitNames
Remove IQuantity.ToString() overloads
Remove IEquatable<T> and equality operators/methods
Remove GlobalConfiguration
Remove obsolete and deprecated code.
Remove Molarity ctor and operator overloads
Remove MinValue, MaxValue per quantity due to ambiguity
Remove string format specifiers: "v", "s"
json: Remove UnitsNetJsonConverter
## ✨ New
QuantityValue: Implement IEquality, IComparable, IFormattable
QuantityValue: 16 bytes instead of 40 bytes (#1084)
Add `[DataContract]` annotations (#972)
## ♻️ Improvements
Upgrade CodeGen, tests and sample apps to net6.0.
## 📝 JSON unit definition schema changes
Rename `BaseType` to `ValueType`, for values "double" and "decimal".
Rename `XmlDoc` to `XmlDocSummary`.
## TODO
Add back `IEquatable<T>`, but implement as strict equality with tuple of quantity name + unit + value.
#1017 (comment)
## Postponed for later
#10671 parent 7519a21 commit 9574d47
File tree
1,290 files changed
+15803
-238136
lines changed- Build
- CodeGen
- Generators
- NanoFrameworkGen
- UnitsNetGen
- UnitsNetWrcGen
- JsonTypes
- Common
- UnitDefinitions
- Samples
- ConsoleApp-NetCore
- MvvmSample.Wpf
- MvvmSample.Wpf
- Converters
- Properties
- Settings
- SimpleConversionDemo.UWP.CSharp
- Assets
- Properties
- SimpleConversionDemo.UWP.WinJS
- css
- images
- js
- lib/winjs-4.0.1
- css
- fonts
- js
- UnitConverter.Console
- UnitConverter.Wpf/UnitConverter.Wpf
- WpfMVVMSample
- UnitsNet.Benchmark
- UnitsNet.NanoFramework/GeneratedCode
- Acceleration
- AmountOfSubstance
- AmplitudeRatio
- Angle
- ApparentEnergy
- ApparentPower
- AreaDensity
- AreaMomentOfInertia
- Area
- BitRate
- BrakeSpecificFuelConsumption
- Capacitance
- CoefficientOfThermalExpansion
- Compressibility
- Density
- Duration
- DynamicViscosity
- ElectricAdmittance
- ElectricChargeDensity
- ElectricCharge
- ElectricConductance
- ElectricConductivity
- ElectricCurrentDensity
- ElectricCurrentGradient
- ElectricCurrent
- ElectricField
- ElectricInductance
- ElectricPotentialAc
- ElectricPotentialChangeRate
- ElectricPotentialDc
- ElectricPotential
- ElectricResistance
- ElectricResistivity
- ElectricSurfaceChargeDensity
- EnergyDensity
- Energy
- Entropy
- ForceChangeRate
- ForcePerLength
- Force
- Frequency
- FuelEfficiency
- HeatFlux
- HeatTransferCoefficient
- Illuminance
- Information
- Irradiance
- Irradiation
- Jerk
- KinematicViscosity
- LapseRate
- Length
- Level
- LinearDensity
- LinearPowerDensity
- Luminance
- Luminosity
- LuminousFlux
- LuminousIntensity
- MagneticField
- MagneticFlux
- Magnetization
- MassConcentration
- MassFlow
- MassFlux
- MassFraction
- MassMomentOfInertia
- Mass
- MolarEnergy
- MolarEntropy
- MolarMass
- Molarity
- Permeability
- Permittivity
- PorousMediumPermeability
- PowerDensity
- PowerRatio
- Power
- PressureChangeRate
- Pressure
- Properties
- Quantities
- RatioChangeRate
- Ratio
- ReactiveEnergy
- ReactivePower
- ReciprocalArea
- ReciprocalLength
- RelativeHumidity
- RotationalAcceleration
- RotationalSpeed
- RotationalStiffnessPerLength
- RotationalStiffness
- Scalar
- SolidAngle
- SpecificEnergy
- SpecificEntropy
- SpecificFuelConsumption
- SpecificVolume
- SpecificWeight
- Speed
- StandardVolumeFlow
- TemperatureChangeRate
- TemperatureDelta
- TemperatureGradient
- Temperature
- ThermalConductivity
- ThermalResistance
- TorquePerLength
- Torque
- Turbidity
- Units
- VitaminA
- VolumeConcentration
- VolumeFlowPerArea
- VolumeFlow
- VolumePerLength
- VolumetricHeatCapacity
- Volume
- WarpingMomentOfInertia
- UnitsNet.NumberExtensions.Tests
- UnitsNet.NumberExtensions
- UnitsNet.Serialization.JsonNet.CompatibilityTests
- UnitsNet.Serialization.JsonNet.Tests
- UnitsNet.Serialization.JsonNet
- Internal
- UnitsNet.Tests
- CustomCode
- CustomQuantities
- GeneratedCode
- TestsBase
- Serialization/Json
- UnitsNet.WindowsRuntimeComponent
- CustomCode
- Quantities
- GeneratedCode
- Quantities
- Units
- InternalHelpers
- Properties
- UnitsNet
- CustomCode
- Quantities
- Units
- Wrappers
- GeneratedCode
- Quantities
- Units
- InternalHelpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,290 files changed
+15803
-238136
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 43 | | |
62 | 44 | | |
63 | 45 | | |
| |||
82 | 64 | | |
83 | 65 | | |
84 | 66 | | |
85 | | - | |
86 | | - | |
| 67 | + | |
87 | 68 | | |
88 | 69 | | |
89 | 70 | | |
| |||
129 | 110 | | |
130 | 111 | | |
131 | 112 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 113 | | |
140 | 114 | | |
141 | 115 | | |
142 | 116 | | |
143 | | - | |
| 117 | + | |
144 | 118 | | |
145 | 119 | | |
146 | | - | |
147 | 120 | | |
148 | 121 | | |
149 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 10 | | |
14 | 11 | | |
15 | | - | |
| 12 | + | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
35 | | - | |
| 31 | + | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | | - | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
| |||
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 69 | | |
75 | 70 | | |
76 | 71 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 72 | | |
81 | 73 | | |
82 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments