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

Bugfix: collection expression support added #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zbyszekprasak
Copy link

@zbyszekprasak zbyszekprasak commented Dec 18, 2024

In README.md there is example of creating ErrorOr form collection of errors using collection expression but in library no such feature exist. Here is implementation of this feature.

Examples:

ErrorOr<int> result = [Error.Validation(), Error.Validation()];
public ErrorOr<int> MultipleErrorsToErrorOr()
{
    return [
        Error.Validation(description: "Invalid Name"),
        Error.Validation(description: "Invalid Last Name")
    ];
}

@zbyszekprasak zbyszekprasak force-pushed the bugfix/collection-expression-support branch from 20ec572 to bc1c2f1 Compare December 18, 2024 20:41
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