Optional icon indicating copy to clipboard operation
Optional copied to clipboard

A robust option type for C#

Results 26 Optional issues
Sort by recently updated
recently updated
newest added

I need to handle request results that may contain errors and I want to filter away the error into an exception. An example of what I'm trying to accomplish is...

I'm looking for `Convert` support in Optional, for use in Reflection, like: ```cs Convert.ChangeType(value, type); ``` where value is of some type and type **might be** `typeof(Option)`, but it could...

.NET Core `csproj` can have `nuget` build in. Really simplifies solution and does all from `dotnet` cli easy.

Imagine there is a higly loaded application making heavy usage of the Option types, and there is a monadic code with all those FlatMaps and Maps, or even worse -...

I'm having some code that needs to transform an `Option` using async functions. But it is getting out of hand. ```csharp public async Task Handle(int id) { var externalFlowId =...

`Option.ToString()` is [currently implemented to return a string representation of `Option`'s state](https://github.com/nlkl/Optional/blob/376982b1f8ea929c123abad75ad0bfeba3e049bd/Optional/Option_Maybe.cs#L98-L111) when ideally it should simply return a blank when `None` or `Some(null)` and the string representation of the...

Hi Nils! I couldn't find a method to check if an Option is empty or satisfies a given predicate. I'm looking for an equivalent for scala's `forall` behaviour on Option....

I just cloned the repo and tried to `.\build.ps1`. This is the output: > C:\Program Files\dotnet\sdk\2.1.104\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(327,5): error : Assets file ' D:\src\Projects\Optional\src\Optional\obj\project.assets.json' not found. Run a NuGet package restore to...

An async optional will make it more convenient to combine Optional with async/await.

enhancement
optional.extensions