Skip to content

Releases: livedcode/ModernBCL.Solution

ModernBCL.Core v1.2.0 – Multi-Targeting, 64-bit Hashing, and Enhanced Guard API

29 Nov 02:23

Choose a tag to compare

🎉 ModernBCL.Core v1.2.0

A major modernization release for .NET Framework developers

This release delivers fully modern BCL functionality to legacy .NET Framework apps—bringing support for high-performance hashing, advanced guard APIs, multi-targeting, and professional-grade debugging via SourceLink.

This is the most significant upgrade to ModernBCL.Core to date.

🚀 New in v1.2.0
✨ Multi-Targeting Support

ModernBCL.Core now builds against 3 frameworks:

net48

net481

net8.0 (for benchmarking & forward compatibility)

The library automatically switches between the polyfill and native implementations.

🧮 High-Performance Hashing Upgrades
✔ New: HashAccumulator64

A 64-bit hashing pipeline with extremely low collision probability—ideal for:

dictionary keys

caching

large collections

custom comparer scenarios

✔ Improved HashCode Polyfill

The polyfill is now:

fully deterministic

non-commutative

zero-allocating

aligned with .NET 7/8 HashCode semantics

✔ New comparer suite

Included:

ObjectHashComparer

EnumerableHashComparer

SequenceHashComparer

Each comparer is optimized for order sensitivity and type safety.

🔐 Modern Guard API (Full Fluent Syntax)

The new fluent guard system provides modern, expressive validation on .NET 4.8:

Guard.Against(value).Null();
Guard.Against(text).NullOrWhiteSpace();
Guard.Against(number).OutOfRange(0, 100);

Includes automatic parameter name capture via a polyfilled [CallerArgumentExpression].

🔬 Extensive Fuzz Testing

New fuzz test coverage ensures reliability across millions of random cases:

HashAccumulator fuzz tests

HashAccumulator64 fuzz tests

Guard API fuzz tests

Comparer fuzz tests

This significantly increases the safety and correctness of all hashing and validation features.

📊 Benchmarking Project (net8.0)

A dedicated BenchmarkDotNet project has been added:

ModernBCL.Benchmarks/

Benchmarks include:

Polyfill HashCode vs native HashCode

HashAccumulator32 vs HashAccumulator64

Guard API overhead

Comparer performance

Benchmark results are emitted in:

HTML

Markdown

CSV

🛠 Project Structure Improvements

This release includes a major cleanup and restructuring:

Clear separation of polyfills, hashing, guards, extensions, and comparers

Multi-TFM build adjustments

Removal of duplicate compile includes

Type conflict fixes for System.HashCode

Enriched NuGet metadata

📦 NuGet Package Enhancements

Version 1.2.0 ships with full NuGet best practices:

Rich PackageTags for search

PackageReadmeFile for rendering README on NuGet.org

MIT license metadata

Symbol packages (.snupkg)

Embedded SourceLink for debugging into your package

Automatic reproducible builds

Developers consuming the package can now step into the library’s source code directly from GitHub during debugging.

🧾 Full Changelog

See:
📄 CHANGELOG.md
Included inside the package and in the repository root.

📥 Installation
dotnet add package ModernBCL.Core.BLC --version 1.2.0

or via NuGet Package Manager:

Install-Package ModernBCL.Core.BLC -Version 1.2.0

❤️ Thank You

Your feedback drives this project forward.
If you find this library helpful, please ⭐ star the repo or share it with others maintaining .NET Framework applications.

ModernBCL.Core.BLC v1.1.1: Support both .net 4.8 and .net 4.8.1

26 Nov 00:03

Choose a tag to compare

[ModernBCL.Core.BLC v1.1.1: improve .NET Framework support.
(https://github.com/livedcode/ModernBCL.Solution/releases/tag/v1.1.1) Latest

The main feature introduced broader .NET Framework support.

🚀 Key Features and Improvements (v1.1.1)

  1. Support both .net4.8 and .net4.8.1

  2. Core Updates
    📦 Installation
    To get this version, install it via NuGet:

Install-Package ModernBCL.Core.BLC -Version 1.1.1

Full Changelog: v1.1.0...v1.1.1

ModernBCL.Core.BLC v1.1.0: Introducing ThrowHelper Guard Clauses

25 Nov 13:57

Choose a tag to compare

This release marks a significant expansion of the ModernBCL.Core library beyond just hashing, focusing on improving developer quality-of-life and code cleanliness in .NET Framework 4.8 projects.

The main feature introduced is a comprehensive polyfill for modern argument validation.

🚀 Key Features and Improvements (v1.1.0)

1. Modern Argument Validation

Introduced the static ThrowHelper class which provides concise, modern guard clauses, eliminating the need for verbose if (null) checks in constructors and methods.

  • ThrowHelper.ThrowIfNull(T value): Throws ArgumentNullException.
  • ThrowHelper.ThrowIfNullOrEmpty(string value): Throws ArgumentException if the string is null or "".
  • ThrowHelper.ThrowIfNullOrWhiteSpace(string value): Throws ArgumentException if the string is null, empty, or only whitespace.

These methods leverage polyfilled attributes (like [CallerArgumentExpression]) to automatically capture the parameter name (nameof(arg)), simplifying code dramatically.

2. Core Updates

  • Package ID Change: Renamed the primary package ID from ModernBCL.Core.HashCode to ModernBCL.Core.BLC.
  • Version Bump: Updated project file (.csproj) and documentation to v1.1.0.
  • Documentation: Updated README.md with clear usage examples for ThrowHelper.

📦 Installation

To get this version, install it via NuGet:

Install-Package ModernBCL.Core.BLC -Version 1.1.0