OneOf icon indicating copy to clipboard operation
OneOf copied to clipboard

Easy to use F#-like ~discriminated~ unions for C# with exhaustive compile time matching

Results 54 OneOf issues
Sort by recently updated
recently updated
newest added

I'm new to this library and not quite sure if I use it the right way. Imagine I want to write a little Parser, that returns a record of type...

Hi! I'm trying to understand how I can use pattern matching with reusable OneOfBase types. The `TResponse` generic parameter here is of type `PaymentProcessed`, but it evaluates `response is PaymentResponse...

As of right now `dotnet build` targeting MacOS ARM64 you get: /usr/local/share/dotnet/sdk/7.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'net5.0' is out of support and will not receive security updates in the...

I think it will be useful to have proper debugger info with the https://learn.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2022 attribute

Considder the following code: ```csharp public class Scenario { private readonly Random random = new(); public RealOutcome DoSomething() { if (random.Next() > int.MaxValue / 2) return new ErrorA(); //Error: Cannot...

It would be really useful to have a code analyzer to display a warning/error for any unhandled instance of `OneOf`. If a developer forgets to handle a `OneOf` result (besides...

When defining a type inheriting a `OneOfBase` with the `[GenerateOneOf]` attribute inside a namespace that contains "OneOf" as a segment, the generator fails. User code: ```csharp namespace MyLibrary.OneOf.Extensions; [GenerateOneOf] public...

Fixes https://github.com/mcintyre321/OneOf/issues/174

Two changes were made: 1. Removed string interpolation from error message (it was not needed). 2. Updated argument passed to mathod GetThingFromDb(...).