I just published two new #dotnet nugets, that make it easier to run background jobs at specific times.
I think they turned out pretty well!
https://t.co/gE7VwUkQsL
https://t.co/rDFfNsA5pe
Discriminated unions in C# 🥳
Looks like this is now an official proposal.
It might actually be happening.
Proposal link in 2nd tweet below ⬇️
#dotnet#csharp
@MartinDotNet I've been reading the other answers and realised there's a simpler way.
You can have a state object that you share between frontend component and background service through DI.
You then increment/modify the state object in your background service, and invoke an eventcallback...
@MartinDotNet Here's an example, an unread message counter that is incremented whenever a new message is sent to the client.
Frontend bit:
https://t.co/HoscB6WHyV
SignalR Client:
https://t.co/HbS7kEno2w
Server triggering the SignalR Hub:
https://t.co/VcDkc1iRjX