- Add strong name support
- Add documentation
- Fix potential System.NullReferenceException in the ToString() methods
- Support multiply (*) and divide (/) operators of ByteSize object
- Add ToString IFormattable parameter overload
- Add target for .NET 5
HUGE BREAKING CHANGE:
By default ByteSize
now assumes 1 KB == 1000 B
and 1 KiB == 1024 B
to
adhere to the IEC and NIST standards (https://en.wikipedia.org/wiki/Binary_prefix).
In the past ByteSize
assumed 1 KB == 1024 B
, that means if you're upgrading
from v1, you'll see differences in values.
Other Breaking Changes:
- Renamed property
LargestWholeNumberSymbol
andLargestWholeNumberValue
toLargestWholeNumberDecimalSymbol
andLargestWholeNumberDecimalValue
respectively. - Drop support for all platforms except
netstandard1.0
andnet45
.
New Features:
- Support for binary and decimal values (e.g.
ByteSize.FromKibiByte
andByteSize.FromKiloByte
). - New constructor that takes a
long
value as the number of bits. - Support for culture on Parse and TryParse
- Add support for subtracting two ByteSize objects.
- Support .NET Standard 1.0 and .NET Framework 3.5.
- Fix TryParse to not throw exceptions.
- Fix ToString result for ByteSize of zero value.
- Improve memory footprint of a ByteSize object.
- Fix parsing of numbers with a group separator like '1,200.56 mb'.
- Localize number decimal separator for Parse and TryParse methods.
- Remove extra dependencies when targeting full framework or portable class library.
- Use 0 as ByteSize.MinValue and fix unit tests for locals.
- Support Core CLR.
- Add localization to ToString method.
- Change namespace to ByteSizeLib.
- Add PetaByte support.
- Add Parse/TryParse, fix arithmitic operations, convert to PCL.
- Initial Release