Digests » 194
this week's favorite
In the ideal world, all .Net asynchronous methods support cancellation tokens: When invoking a method, simply pass it a cancellation token. Then, at the appropriate time, cancel the token and the asynchronous operation terminates. Alas! We don’t live in the ideal world. Not every method we might asynchronously invoke works with cancellation tokens. When faced with an asynchronous operation we want to be able to cancel that doesn’t support cancellation tokens, one option is to implement our own cancellation logic by registering a callback with the token. When the token is cancelled, callbacks registered with it are executed.
Containers are much easier to manage than virtual machines, and lend themselves to really sweet CD workflows. These are my notes on setting up CD with Docker, Bitbucket, DotNet Core and Azure Container Instances, and issues that I’ve encountered.
Visual Studio is a great development environment. But with a few extensions, it will be even better. There's a lot of free extensions out there, that will improve the experience of writing code and even help you reduce bugs too. We have collected a list of the best free extensions for Visual Studio.
Microsoft has taken another step towards .NET running in the browser by adopting the web UI framework Blazor from its creator Steve Sanderson. By doing so, Microsoft adds another piece to their WebAssembly/.NET stack, giving .NET developers a higher order abstraction to build browser-based apps with.
Almost every non-trivial behavior of the async methods in C# can be explained based on one user scenario: migration of the existing synchronous code to asynchronous should be as simple as possible. You should be able to add async keyword before a method's return type, add Async suffix to its name, add await keyword here and there in the method body to get a fully functional asynchronous method.