Skip to content

Changelog

Andreas Gullberg Larsen edited this page Dec 30, 2018 · 11 revisions

Breaking changes and old history is described below. For latest changes, see the Releases page.

4.0 - Reduce binary size and a address a long wishlist of breaking changes

Date: December 17, 2018

In two years UnitsNet has grown from 280 kB to 1.4 MB. A lot of it is due to unnecessary syntactic sugar for various number types and nullable types - for every of our 800+ units! It simply adds up to a big total.

This release brings the binary size back down to 585 kB and addresses a long wishlist #180 of breaking changes accumulated over the years.

See Upgrading from 3.x to 4.x.

Added

  • UnitSystem with a different meaning, now defines the base units for a unit system (#524)

Removed

  • Replace netstandard1.0 target with netstandard2.0, to avoid the extra dependencies (#477)
  • Remove code marked as [Obsolete], such as VolumeUnit.Teaspoon (#490)
  • Remove nullable From factory methods (#483)
  • Remove all number extension methods (#497, #483)
  • Remove Length2d, replaced by Area or provide your own (#501)
  • Remove static methods on UnitSystem, should use UnitSystem.Default instead (#496)
  • Remove unit parameter from ToString() methods (#546)

Changed

Renamed

  • Correct SingularName for some Flow unit definitions (#494, see #360)
  • Split UnitSystem into UnitParser, GlobalConfiguration, UnitAbbreviationsCache (#511)

Fixed

  • Search for any TODO comments in the code to address, remove comment and either fix or create issue (5d24432a)
  • Update README with v4 changes #498
  • Do not try/catch in UnitConverter.Try-methods (#506)
  • Do not try/catch in Length.TryParse() and for other quantities (#507)

3.0 - Clean up naming of units

Date: 2014-07-23

New

  • Add information units for bit, byte, kilobit, kilobyte, kibibit, kibibyte and so on up to exabyte

Breaking changes

  • Delete OtherUnit.Piece
  • Move OtherUnit.Table/Teaspoon to Volume
  • Rename Month30Days Year365Days units to Month and Year
  • Fix plural naming of Pressure.KilogramsForcePerSquareCentimeterInOnePascal
  • Fix plural naming of Ratio.PartsPer-units
  • Custom units added manually via UnitSystem.MapUnitToAbbreviation()

Fixes

  • Fall back to US English culture when parsing/getting abbreviations
  • Fall back to custom string if no abbreviation defined for unit

Behind the scenes

  • Replace T4 templates with PowerShell + JSON templates
  • Support custom tolerance per unit in tests
  • Support decimal and long base unit types (decimal used in Information unit)
  • Move code more consistently into Custom/GeneratedCode folders
  • Fix misc R# warnings
  • Match R# cleanup profile in generated code

2.0 - Add support for custom units. Add ratio unit.

Date: 2014-02-09

Breaking changes

  • Merge UnitValue and UnitConverter into unit classes.

v1.13: Add mass unit (pound) (thanks @strvmarv).

v1.12: Add speed units (km/h, m/s, ft/s, knots, mph). Add mass units (microgram, nanogram).

v1.11: Fix bugs in Flow and RotationalSpeed units after refactoring to T4 templates (thanks George Zhuikov). Add Temperature units.

v1.10:

  • Add missing localization to units for US English and Russian cultures (thanks George Zhuikov).
  • Add RotationalSpeed and Flow unit classes (thanks George Zhuikov).
  • Add mils and microinches length units (thanks Georgios).
  • Refactor to generate unit classes with T4 templates, a lot less work to add new units.

v1.9: Improve precision of PoundForce unit (thanks Jim Selikoff).

v1.8:

  • Add angle units of measurement (thanks Georgios).
  • Add tests and fix bug in NewtonPerSquareCentimeter and NewtonPerSquareMillimeter.

v1.7: Add imperial and US units for volume and area.

v1.6: Add area units. Fix exception in TryConvert for volume units.

v1.5: Add volume units of measurement (thanks @vitasimek). Add missing operator overloads.

v1.4: Add ShortTon and LongTon mass units (thanks Cameron MacFarland). Add TryConvert methods.

v1.3: Add pressure units. Add dynamic conversion via UnitConverter and UnitValue

v1.2: Add force, torque, pressure, mass, voltage, length and length2d units of measurement.