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

v5 Release #982

Merged
merged 75 commits into from
Nov 29, 2022
Merged

v5 Release #982

merged 75 commits into from
Nov 29, 2022

Conversation

angularsen
Copy link
Owner

@angularsen angularsen commented Nov 2, 2021

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 IEquatable 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

#1067

angularsen and others added 29 commits November 1, 2021 21:05
Only a single hyphen per function name allowed.
Rename JSON field and quantity class property.
No longer needed after dropping net40 target
- MinValue
- MaxValue
- ToString overloads
@angularsen angularsen added this to the 5.0 milestone Nov 2, 2021
angularsen and others added 7 commits June 7, 2022 16:34
# Conflicts:
#	UnitsNet.NanoFramework/GeneratedCode/Units/AccelerationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AmountOfSubstanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AmplitudeRatioUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AngleUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ApparentEnergyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ApparentPowerUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AreaDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AreaMomentOfInertiaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/AreaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/BitRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/BrakeSpecificFuelConsumptionUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/CapacitanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/CompressibilityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/DurationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/DynamicViscosityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricChargeDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricChargeUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductivityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCurrentDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCurrentGradientUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCurrentUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricFieldUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricInductanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialAcUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialChangeRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialDcUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistivityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ElectricSurfaceChargeDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/EnergyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/EntropyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ForceChangeRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ForcePerLengthUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ForceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/FrequencyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/FuelEfficiencyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/HeatFluxUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/IlluminanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/InformationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/IrradianceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/IrradiationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/JerkUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/KinematicViscosityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LapseRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LevelUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LinearDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LinearPowerDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LuminosityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LuminousFluxUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/LuminousIntensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MagneticFieldUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MagneticFluxUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MagnetizationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassConcentrationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassFlowUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassFluxUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassFractionUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MassUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MolarEnergyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MolarEntropyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MolarMassUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/MolarityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PermeabilityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PermittivityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PowerDensityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PowerRatioUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PowerUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PressureChangeRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RatioChangeRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RatioUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ReactiveEnergyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ReactivePowerUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ReciprocalAreaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ReciprocalLengthUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RelativeHumidityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RotationalAccelerationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RotationalSpeedUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/RotationalStiffnessUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ScalarUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SolidAngleUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpecificEnergyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpecificEntropyUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpecificVolumeUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpecificWeightUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/SpeedUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/StandardVolumeFlowUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TemperatureChangeRateUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TemperatureDeltaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TemperatureGradientUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TemperatureUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ThermalConductivityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/ThermalResistanceUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TorquePerLengthUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TorqueUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/TurbidityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VitaminAUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumeConcentrationUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowPerAreaUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumePerLengthUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs
#	UnitsNet.NanoFramework/GeneratedCode/Units/WarpingMomentOfInertiaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AccelerationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AmountOfSubstanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AmplitudeRatioUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AngleUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ApparentEnergyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ApparentPowerUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AreaDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AreaMomentOfInertiaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/AreaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/BitRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/BrakeSpecificFuelConsumptionUnit.g.cs
#	UnitsNet/GeneratedCode/Units/CapacitanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs
#	UnitsNet/GeneratedCode/Units/CompressibilityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/DensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/DurationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/DynamicViscosityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricChargeDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricChargeUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricConductanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricConductivityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricCurrentDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricCurrentGradientUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricCurrentUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricFieldUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricInductanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricPotentialAcUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricPotentialChangeRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricPotentialDcUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricPotentialUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricResistanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricResistivityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ElectricSurfaceChargeDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/EnergyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/EntropyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ForceChangeRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ForcePerLengthUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ForceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/FrequencyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/FuelEfficiencyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs
#	UnitsNet/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs
#	UnitsNet/GeneratedCode/Units/IlluminanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/InformationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/IrradianceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/IrradiationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/JerkUnit.g.cs
#	UnitsNet/GeneratedCode/Units/KinematicViscosityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LapseRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LevelUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LinearDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LinearPowerDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LuminosityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LuminousFluxUnit.g.cs
#	UnitsNet/GeneratedCode/Units/LuminousIntensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MagneticFieldUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MagneticFluxUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MagnetizationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassConcentrationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassFlowUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassFluxUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassFractionUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MassUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MolarEnergyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MolarEntropyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MolarMassUnit.g.cs
#	UnitsNet/GeneratedCode/Units/MolarityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PermeabilityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PermittivityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PowerDensityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PowerRatioUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PowerUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PressureChangeRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/PressureUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RatioChangeRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RatioUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ReactiveEnergyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ReactivePowerUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ReciprocalAreaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ReciprocalLengthUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RelativeHumidityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RotationalAccelerationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RotationalSpeedUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RotationalStiffnessPerLengthUnit.g.cs
#	UnitsNet/GeneratedCode/Units/RotationalStiffnessUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ScalarUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SolidAngleUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpecificEnergyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpecificEntropyUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpecificVolumeUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpecificWeightUnit.g.cs
#	UnitsNet/GeneratedCode/Units/SpeedUnit.g.cs
#	UnitsNet/GeneratedCode/Units/StandardVolumeFlowUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TemperatureChangeRateUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TemperatureDeltaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TemperatureGradientUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TemperatureUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ThermalConductivityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/ThermalResistanceUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TorquePerLengthUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TorqueUnit.g.cs
#	UnitsNet/GeneratedCode/Units/TurbidityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VitaminAUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumeConcentrationUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumeFlowPerAreaUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumeFlowUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumePerLengthUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumeUnit.g.cs
#	UnitsNet/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs
#	UnitsNet/GeneratedCode/Units/WarpingMomentOfInertiaUnit.g.cs
# Conflicts:
#	UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Compressibility.g.cs
#	UnitsNet.WindowsRuntimeComponent/Properties/AssemblyInfo.cs
#	UnitsNet.WindowsRuntimeComponent/UnitsNet.WindowsRuntimeComponent.nuspec
There is no unit with enum value 0 anymore. In v4, this was Undefined.
- QuantityValue implements most of the INumber interface members / operators (operations  preserving decimal when possible, failing back to double, clamped to the real values- infinities excluded)
- changed the type of IQuantity.Value/As to QuantityValue (explicit cast required)
- added back the IEquatable interface: behavior depending on the runtime type of the quantity values (strict equality comparison for double/double)
- added back the fix for the non-reflexive CompareTo issue (and the corresponding tests)
- added a check preventing the possible stack overflow exception when calling ToUnit() with default(TUnit) (or any other invalid Enum value)
- DataContracts changed to reflect the possible use of either double or decimal as ValueType (the Json converters were not changed- but probably should be)
- removed the obsolete Json converter tests
The converter it tested no longer exists.
@stale
Copy link

stale bot commented Nov 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 2, 2022
@angularsen angularsen added the pinned Issues that should not be auto-closed due to inactivity. label Nov 2, 2022
@stale stale bot closed this Nov 12, 2022
pgrawehr and others added 4 commits November 29, 2022 22:05
Fixes #1058 

Return the correct value type for quantities that use `decimal` internally; `Power, Information, BitRate`.

- Quantity properties return `decimal` or `double` based on internal value type.
- `IQuantity.Value` returns `QuantityValue`, which supports both double and decimal.
- `QuantityValue`: Implement IEquality<QuantityValue>, IComparable<QuantityValue>, IComparable.

Co-authored-by: Andreas Gullberg Larsen <[email protected]>
@angularsen angularsen mentioned this pull request Nov 29, 2022
@angularsen angularsen reopened this Nov 29, 2022
@stale stale bot removed wontfix labels Nov 29, 2022
@angularsen angularsen marked this pull request as ready for review November 29, 2022 22:42
@angularsen angularsen merged commit 9574d47 into master Nov 29, 2022
@angularsen angularsen deleted the release/v5 branch November 29, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Issues that should not be auto-closed due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v5: Wishlist for breaking changes
7 participants