Closed manuel-ornato closed 6 years ago
Hi Manuel,
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.
Have a great day.
Best regards, / Nils
(also see https://github.com/nlkl/Optional/issues/47 )
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 itopt.Match(v => Option.None<TException>(), ex => ex.Some())
? Maybe an extension method (ToException
?) that does that would be a fine addition to the lib. AnExceptionOrFailure
in unsafe might also be provided.I have to say this lib changed my programmer's life! Thanks a lot for your work.
Manuel