Fluent API to await multiple calls and get their respective results
Sometimes, you have multiple async calls to make, and you want to do that asynchronously and get the results afterward. Let's build a fluent API to do that.
Hey, I'm Steven a .NET Developer and Freelancer in Zurich, Switzerland. I am a Microsoft MVP.
Also, this blog is open source on GitHub.
Sometimes, you have multiple async calls to make, and you want to do that asynchronously and get the results afterward. Let's build a fluent API to do that.
Deconstructor are a C# language feature that allows you to define a method that will be called when an object is being split up into its components. While this is straightforward to implement for your own types, it is not possible to add a deconstructor to a 3rd party type - or is it?
Pattern matching is a powerful feature in C#. It allows you to match a value against a pattern and extract information from the value. The compiler does the magic for you - and sometimes it struckles with that.
C# 13 might get a new feature soon that allows ref
and unsafe
in iterators and async methods.
Hangfire/Quartz or BackgroundService? Why not something in the middle? Did you ask yourself this question from time to time? Do you want to have a full-blown job scheduler with lots of setups, but more than BackgroundService is needed?
Meet: NCronJob!
Next to the big release of .NET 8, we also released the first preview bUnit v2. This release is a major release, with a lot of new features and improvements. In this post, I will highlight some of the most important changes. This includes new features but also some breaking changes.
I recently discovered this small but very useful utility in xUnit: TheoryData<T>
.
A few weeks back, I wrote an article "A new lock type in .NET 9" where I showcased the new Lock
type. Nothing fancy - well, at least it was more expressive. But now the dotnet team went a step further with this!
Boolean parameters are nice, but it's hard to keep track of what each one does when you have multiple of them. In this blog post, we will see why it's better to avoid multiple boolean parameters and how to refactor them.
After my first LINQ MindMap: Here is an updated version that includes everything up until .NET 9.