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

Generic ValueOrError #48

Open
Odonno opened this issue Dec 7, 2017 · 3 comments
Open

Generic ValueOrError #48

Odonno opened this issue Dec 7, 2017 · 3 comments
Assignees
Milestone

Comments

@Odonno
Copy link
Contributor

Odonno commented Dec 7, 2017

Is it possible to use ValueOrError<TValue> or even ValueOrError<TValue, TError>?

I mean, what if you want to get a value of a POCO object (as value) and return an Exception (as error)?

@DeafLight
Copy link
Contributor

Could not agree more, this looks a lot like Vladimir Khorikov's Result object in his functional courses.

@DavidArno
Copy link
Owner

Interesting. I hadn't really thought of using ValueOrError like that, but it does make sense. So I'll add support for ValueOrError<TValue, TError>, I think.

@DavidArno DavidArno self-assigned this Apr 3, 2018
@DavidArno DavidArno added this to the V4.0 milestone Apr 3, 2018
DavidArno added a commit that referenced this issue Jul 20, 2018
STill a couple of tests missing, but the basic functionality is there.
DavidArno added a commit that referenced this issue Jul 23, 2018
Fixed a bunch of spelling mistakes too.
@DavidArno
Copy link
Owner

Need to document this new type in the wiki now that v4 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants