Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorOr<TValue> and Error now behave like Value Objects #97

Merged
merged 2 commits into from
May 9, 2024

Commits on Apr 27, 2024

  1. feat: ErrorOr<TValue> is now a proper value object

    This commit implements Equals and GetHashCode for the
    ErrorOr<TValue> struct so that a deep comparison with the
    errors list is performed (instead of the default reference
    equality comparison). I introduced Microsoft.Bcl.HashCode for
    .NET Standard 2.0 because I did not want to reinvent the wheel
    for the HashCode class. If we do not want this dependency
    then we should copy over the source code for .NET Standard 2.0.
    
    Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
    feO2x committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    f8dffac View commit details
    Browse the repository at this point in the history
  2. feat: Error is now a proper value object

    This commit implements Equals and GetHashCode in the same way
    that the previous commit implemented it for ErrorOr<TValue>.
    
    Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
    feO2x committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    7ab0b73 View commit details
    Browse the repository at this point in the history