Codebelt.Unitify 9.0.0-rc.1

This is a prerelease version of Codebelt.Unitify.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Codebelt.Unitify --version 9.0.0-rc.1                
NuGet\Install-Package Codebelt.Unitify -Version 9.0.0-rc.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Codebelt.Unitify" Version="9.0.0-rc.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Codebelt.Unitify --version 9.0.0-rc.1                
#r "nuget: Codebelt.Unitify, 9.0.0-rc.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Codebelt.Unitify as a Cake Addin
#addin nuget:?package=Codebelt.Unitify&version=9.0.0-rc.1&prerelease

// Install Codebelt.Unitify as a Cake Tool
#tool nuget:?package=Codebelt.Unitify&version=9.0.0-rc.1&prerelease                

About

An open-source project (MIT license) that offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples.

It is, by heart, free, flexible and built to extend and boost your agile codebelt.

Codebelt.Unitify for .NET

The Codebelt.Unitify namespace offers types that simplify unit management with comprehensive metric and binary support for prefixes, multiples, and submultiples.

More documentation available at our documentation site:

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 88 11/14/2024
9.0.0-rc.1 49 11/12/2024
9.0.0-preview.1 49 11/10/2024

Version: 9.0.0
Availability: .NET 9 and .NET 8
 
# Breaking Changes
- REMOVED BitStorageCapacity class from the Codebelt.Unitify namespace
- REMOVED ByteStorageCapacity class from the Codebelt.Unitify namespace
- REFACTORED StorageCapacity class in the Codebelt.Unitify namespace to DataPrefixTable that represents a table of both binary and metric prefixes for units of measure, optimized for data quantity and transmission measurement standards
- REFACTORED MultipleTable class in the Codebelt.Unitify namespace to PrefixTable that represents a table of unit prefixes, indicating multiples or submultiples of a base unit
- REFACTORED PrefixMultiple class in the Codebelt.Unitify namespace to Prefix that represents the base class from which all implementations of unit prefix that can can be expressed as either a multiple or a submultiple should derive
- REFACTORED IPrefixMultiple interface in the Codebelt.Unitify namespace to IPrefix that defines a unit prefix that can can be expressed as either a multiple or a submultiple of the unit of measurement
- REFACTORED IPrefixUnit interface in the Codebelt.Unitify namespace to not include PrefixValue property
- REFACTORED UnitPrefix enum in the Codebelt.Unitify namespace to PrefixStyle that specifies ways that a string must be represented in terms of prefix style
- REFACTORED PrefixUnit class in the Codebelt.Unitify namespace to a non-abstract class that represents the prefix of a unit of measurement
- REFACTORED UnitPrefixFormatter class in the Codebelt.Unitify namespace to PrefixUnitFormatter that defines the string formatting of objects having an implementation of IPrefixUnit
 
# New Features
- ADDED BaseUnit struct in the Codebelt.Unitify namespace that represents a base unit of measurement, including its category, name, and symbol
- ADDED IBaseUnit interface in the Codebelt.Unitify namespace that defines a base unit of measure, including its category, name, and symbol
- ADDED MetricPrefixTable class in the Codebelt.Unitify namespace that represents a table of metric prefixes for units of measure, optimized for metric measurement standards
- ADDED PrefixExtensions class in the Codebelt.Unitify namespace that provides extension methods for the Prefix class: ToPrefixUnit and ToBaseUnit
- ADDED PrefixTableExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixTable class: QuectoOrDefault, RontoOrDefault, YoctoOrDefault, ZeptoOrDefault, AttoOrDefault, FemtoOrDefault, PicoOrDefault, NanoOrDefault, MicroOrDefault, MilliOrDefault, CentiOrDefault, DeciOrDefault, DecaOrDefault, HectoOrDefault, KiloOrDefault, MegaOrDefault, GigaOrDefault, TeraOrDefault, PetaOrDefault, ExaOrDefault, ZettaOrDefault, YottaOrDefault, RonnaOrDefault, QuettaOrDefault, KibiOrDefault, MebiOrDefault, GibiOrDefault, TebiOrDefault, PebiOrDefault, ExbiOrDefault, ZebiOrDefault and YobiOrDefault
- ADDED PrefixUnitExtensions class in the Codebelt.Unitify namespace that provides extension methods for the PrefixUnit class: ToPrefixValue, ToBaseValue, ToBaseUnit, ToPrefixString, ToMetricPrefixTable and ToDataPrefixTable
- ADDED Unit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measure should derive
- ADDED UnitFactory class in the Codebelt.Unitify namespace that provides a set of static methods for generating different types of unit of measure and the option to define your own with CreateUnit
- ADDED UnitFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of IUnit
 
Version: 6.0.0
Availability: .NET Standard 2.0, .NET 5.0
 
# New Features
- ADDED BinaryPrefix class in the Codebelt.Unitify namespace that defines a binary unit prefix for multiples of measurement for data that refers strictly to powers of 2
- ADDED BitStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a BitUnit
- ADDED BitUnit class in the Codebelt.Unitify namespace that represents a unit of measurement for bits and is used with measurement of data
- ADDED ByteStorageCapacity class in the Codebelt.Unitify namespace that represent a table of both binary and metric prefixes for a ByteUnit
- ADDED DecimalPrefix class in the Codebelt.Unitify namespace that defines a decimal (metric) unit prefix for multiples and submultiples of measurement that refers strictly to powers of 10
- ADDED IPrefixMultiple interface in the Codebelt.Unitify namespace that defines a unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement
- ADDED IUnit interface in the Codebelt.Unitify namespace that defines a unit of measurement that is used as a standard for measurement of the same kind of quantity
- ADDED MultipleTable class in the Codebelt.Unitify namespace that defines a unit of measurement that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure to indicate a multiple of the unit
- ADDED NamingStyle enum in the Codebelt.Unitify namespace that specifies ways that a string must be represented in terms of naming style
- ADDED UnitFormatOptions class in the Codebelt.Unitify namespace that specifies options related to BitUnit and ByteUnit
- ADDED UnitPrefix enum in the Codebelt.Unitify namespace that specifies the two standards for binary multiples and decimal multiples
- ADDED UnitPrefixFormatter class in the Codebelt.Unitify namespace that defines the string formatting of objects having an implementation of either IPrefixUnit or IUnit
- ADDED PrefixMultiple class in the Codebelt.Unitify namespace that represents the base class from which all implementations of unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement should derive
- ADDED StorageCapacity class in the Codebelt.Unitify namespace that provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure optimized for storage capacity measurement standards
- ADDED StorageCapacityOptions class in the Codebelt.Unitify namespace that specifies options related to StorageCapacity
- ADDED PrefixUnit class in the Codebelt.Unitify namespace that represents the base class from which all implementations of a unit of measurement should derive
 
# Improvements
- CHANGED BinaryPrefix in the Codebelt.Unitify namespace from struct to sealed class
- CHANGED DecimalPrefix in the Codebelt.Unitify namespace from struct to sealed class
- REFACTORED MultipleTable in the Codebelt.Unitify namespace to be more generic and moved non-generic functionality to the new StorageCapacity class
- CHANGED BitUnit in the Codebelt.Unitify namespace from struct to sealed class
- CHANGED ByteUnit in the Codebelt.Unitify namespace from struct to sealed class
 
# Quality Analysis Actions
- FIXED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://rules.sonarsource.com/csharp/RSPEC-927
- CHANGED BinaryPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code
- CHANGED DecimalPrefix class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code
- CHANGED BitUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code
- CHANGED ByteUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code
- CHANGED UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822