You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems Optional.Collection misses Values and Exceptions extension methods in Nuget package 1.1.0.
By the way, I was wondering what is the best way of accessing the Exception property of an Option<T,TException>?
Is it opt.Match(v => Option.None<TException>(), ex => ex.Some())?
Maybe an extension method (ToException ?) that does that would be a fine addition to the lib.
An ExceptionOrFailure in unsafe might also be provided.
I have to say this lib changed my programmer's life! Thanks a lot for your work.
Manuel
The text was updated successfully, but these errors were encountered:
Thank you for the nice words and your interest in the project.
Regarding the .Values() and .Exceptions() extension methods, these are not included in Optional.Collections, but part of the upcoming v4 release, which directly includes the most important functionality from Optional.Collections (which in turn will not be supported in the future). You can grab the pre-release on Nuget - I have been using it for some time already without any problems, so it should be rather stable (and will be fully released in the not-too-distant future).
Currently, .Match(...) is the preferred way to get the exceptional value. I am, however, always considering ways improve usability of the library, and streamlining the ways in which you can work with exceptional values is definitely on the roadmap.
Hi,
It seems
Optional.Collection
missesValues
andExceptions
extension methods in Nuget package 1.1.0.By the way, I was wondering what is the best way of accessing the
Exception
property of anOption<T,TException>
?Is it
opt.Match(v => Option.None<TException>(), ex => ex.Some())
?Maybe an extension method (
ToException
?) that does that would be a fine addition to the lib.An
ExceptionOrFailure
in unsafe might also be provided.I have to say this lib changed my programmer's life! Thanks a lot for your work.
Manuel
The text was updated successfully, but these errors were encountered: