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
I've seen too many times developers using .Switch instead of .Match when calling async void code inside the lambdas, because the default behaviour when you want to perform a void operation is to .Switch rather than .Match, resulting in
which isn't awaited correctly (resulting in exceptions being lost)
A .SwitchAsync method which accepts a Func<T, Task> for each parameter would make it really clear than an async option can be used (even gives an IDE hint), and the behaviour would be the same as .Match(Func<T, Task>)
zetroot, mishrsud, marc-costello, Aaronmsv, ogrim and 4 more