Skip to content

Conversation

@suranig
Copy link
Owner

@suranig suranig commented Jun 8, 2025

[0.2.0] - 2025-06-08

Changed

  • BREAKING: Upgraded target framework from .NET Standard 2.0 to .NET 8.0
  • Modernized Guard class to use .NET 8 built-in methods (ArgumentNullException.ThrowIfNull, ArgumentException.ThrowIfNullOrEmpty, ArgumentException.ThrowIfNullOrWhiteSpace)
  • Enhanced Entity class with IEquatable<Entity> implementation and improved equality comparisons using EqualityComparer.Default
  • Improved ValueObject class with IEquatable implementation and System.HashCode for better hash code generation
  • Modernized Result and Result classes with C# 12 collection expressions, target-typed new expressions, and implicit conversion operators
  • Updated AggregateRoot to use collection expressions and AsReadOnly() instead of ToImmutableList() for better performance
  • Enhanced Guard methods with CallerArgumentExpression attributes for automatic parameter name detection
  • Added NotNull attributes for better nullable reference types support

Removed

  • Dependency on System.Collections.Immutable package (no longer needed)

Fixed

  • Resolved CS8604 nullable reference warning in Guard.AgainstNullOrEmpty method
  • Updated unit tests to match .NET 8 exception behavior (ArgumentNullException for null values in ThrowIfNullOrEmpty/ThrowIfNullOrWhiteSpace)

suranig added 8 commits June 8, 2025 13:50
…rowIfNull() built-in method - Use ArgumentException.ThrowIfNullOrEmpty() and ThrowIfNullOrWhiteSpace() - Add CallerArgumentExpression attributes for automatic parameter names - Add NotNull attributes for better nullable reference types support - Fix CS8604 nullable reference warning
…<TId>> for better performance - Use EqualityComparer<T>.Default for more efficient comparisons - Simplify equality operators using EqualityComparer - Use ArgumentNullException.ThrowIfNull for better null checking
…alueObject> interface - Use System.HashCode for better hash code generation algorithm - Simplify equality operators using EqualityComparer
…essions [] instead of new List<string>() - Use target-typed new expressions new() instead of new Result() - Add implicit operator for T to Result<T> conversion - Add params overloads for better API usability - Add better validation using .NET 8 ThrowIf methods
…expressions [] - Use AsReadOnly() instead of ToImmutableList() for better performance - Add HasDomainEvents property for convenience - Add Guard validation for AddDomainEvent method
…nge target framework from netstandard2.0 to net8.0 - Remove System.Collections.Immutable dependency (no longer needed) - Update package version to 0.2.0
… ArgumentNullException for null values in ThrowIfNullOrEmpty/ThrowIfNullOrWhiteSpace - Remove explicit parameter names (using CallerArgumentExpression) - Align test expectations with .NET 8 built-in method behavior
…g entry for .NET 8 modernization - Document breaking changes, improvements, and fixes - Include details about new features and removed dependencies
@suranig suranig self-assigned this Jun 8, 2025
@suranig suranig added the enhancement New feature or request label Jun 8, 2025
@codecov
Copy link

codecov bot commented Jun 8, 2025

Codecov Report

Attention: Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/AggregateKit/Entity.cs 91.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

suranig added 2 commits June 8, 2025 14:03
…esult class validation and edge cases - Add tests for Entity IEquatable implementation and null handling - Add tests for ValueObject with null components and operators - Add tests for AggregateRoot HasDomainEvents property and Guard validation - Fix test expectations to match .NET 8 ThrowIfNullOrWhiteSpace behavior - Increase line coverage from 86.98% to 97.26% and branch coverage to 100%
…e - Add StringEntity tests to cover ArgumentNullException.ThrowIfNull path - Add test for parameterless constructor verification - Fix failing test for empty string ID validation - Ensure all Entity.cs lines are covered by tests
@suranig suranig merged commit 84c1803 into master Jun 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant