Skip to content

Feature: exposing weakly typed value in interface#136

Open
zbyszekprasak wants to merge 4 commits intoamantinband:mainfrom
zbyszekprasak:feature/exposing-weakly-typed-value-in-interface
Open

Feature: exposing weakly typed value in interface#136
zbyszekprasak wants to merge 4 commits intoamantinband:mainfrom
zbyszekprasak:feature/exposing-weakly-typed-value-in-interface

Conversation

@zbyszekprasak
Copy link

@zbyszekprasak zbyszekprasak commented Dec 22, 2024

I have added weakly-typed Value property to IErrorOr interface as described in #121.

Example:

 IErrorOr errorOrPerson = ErrorOrFactory.From(person);
 if (!errorOrPerson.IsError)
 {
     Console.WriteLine(errorOrPerson.Value);
 }

tmiller1995 added a commit to tmiller1995/error-or that referenced this pull request Jan 15, 2026
Introduces side-effect execution methods for error states that preserve the original result instead of transforming it, enabling logging and metrics without recovery.

Adds async conversion helpers to seamlessly integrate with database and API operations, allowing direct chaining without manual wrapping.

Implements error aggregation utilities to combine multiple results or append errors, supporting scenarios with parallel operations or validation accumulation.

Exposes value access through non-generic interface for logging and serialization frameworks that operate without compile-time type knowledge.

Enables collection expression syntax for error construction, improving readability and consistency with modern C# patterns.

Expands factory methods to support creation from single errors, error collections, and their async variants for uniform instantiation.

Optimizes internal null checking and corrects documentation examples.

Based on amantinband#117, amantinband#118, amantinband#122, amantinband#125, amantinband#128, amantinband#129, amantinband#133, amantinband#134, amantinband#135, amantinband#136
Addresses amantinband#120, amantinband#121, amantinband#139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant