Blazor Best Practices: Handling Errors
Errors are likely to occur, the question is how to handle them. Let’s take a look at best practices in handling them in your Blazor app.
this week's favorite
Serializing asynchronous operations in C#
A serialization pattern for asynchronous operations is making sure only one operation is active at a time, usually because the operation is itself internally stateful, and you don’t want multiple operations trying to mutate the state at the same time.
A Guide to Building a .NET 6.0-Based C# Scripting Engine for Games
Welcome to the first in a series of blog posts detailing how to integrate .NET 6.0 C# scripting support into a C++ Windows game engine. Most of what I am going to detail is based on my research and work in developing a C# scripting system for my DigiPen game projects and is most likely not perfect, but I can guarantee the solution works.
If you ever deal with legacy code, it is worth understanding what happens here in a bit more detail. A few years ago, discards were not a thing in C#, but recent versions have gradually been adding more support for them. This history means that not everything is as it seems, and it can be useful to know that, because it can explain some strange-looking practices in older code.
.NET One-line Scoped Initializers with Dependency Injection
As I work more consistently with the top-level style of .NET and ASP.NET Core applications, I find myself needing to do more start-up operations that have to occur before my application starts. Typically, in an ASP.NET Core application, the server is ready to begin accepting requests after a call to app.Run method or one of its variants.
Beware of records, with expressions and calculated properties
Given their terseness, even ignoring the other records characteristics, as soon as I’m creating a type that I’m expecting to be immutable, I immediately start with a record. However this might not always be adequate, and in this post we’ll look at a very specific example where I introduced a bug in the code due to not taking into consideration all of the records characteristics.
Free Learnk8s Training Series: Scaling Apps, Nodes, and Clusters
Learnk8s is back with a new virtual lab series. Supported by documentation, scripts, code examples, and a hands-on demo, you’ll deploy and scale an application using the Linode Kubenetes Engine to create clusters. Registration is free and all 3 sessions are open now. Reserve your seat today!