#408 Unit tests for legacy systems with .NET 6

sponsor

Try GrapeCity’s Award-Winning Developer Tools

Experience GrapeCity’s collection of industry-leading JavaScript and .NET grids, UI, reporting, spreadsheets, document APIs, and mobile controls. GrapeCity empowers your development with familiar and accessible components so you can design for a variety of platforms and devices. Try any of our software solutions free for 30 days.

this week's favorite

Unit tests for legacy systems with .NET 6

As you move towards .NET 6, you also get new opportunities to upgrade legacy codebases to the latest and greatest. Unfortunately, updating a legacy codebase can be nerve-racking. Luckily, in this post, I wanted to share a technique I recently discovered that allows you to alter the behavior of static classes without changing the surface API of a legacy codebase. Of course, this approach has its limits, but I think it’s a valuable technique to have in your toolkit.

Go To Definition improvements for external source in Roslyn

Decompilation is a great way to get a feel for the shape of an API that you’re referencing, but it does have some downsides, the biggest of which is that a decompilation can only be created from the IL that is in the referenced DLL.

How to build .NET minimal APIs

The release of .NET 6 came with a with of minimal api’s which enable the development of small and functional single file Web API’s.

.NET type for personally identifiable information (PII)

At some point, I started to feel discomfort working with personally identifiable information data in our project. Mostly, because it is a relatively new field and not always straightforward. In this article, I’m going to try to tackle the main issues and make the implicit explicit.

Performance benefits of sealed class in .NET

By default, classes are not sealed. This means that you can inherit from them. I think this is not the right default. Indeed, unless a class is designed to be inherited from, it should be sealed. You can still remove the sealed modifier later if there is a need. In addition to not be the best default, it has performance implications. Indeed, when a class is sealed the JIT can apply optimizations and slightly improve the performance of the application.

newsletters

Would you like to become a sponsor and advertise in one of the issues? Check out our media kit and get in touch.