- C# Digest
- Posts
- The impact of locks and waits on latency
The impact of locks and waits on latency
WaitHandle events introduced in .NET 9 help detect and measure wait times
Measuring the impact of locks and waits on latency in your .NET apps
6 minutes by Christophe Nasarre
In this article Christophe discusses new WaitHandle events introduced in .NET 9 that help detect and measure wait times in multi-threaded applications. The post explains how to leverage these events using the TraceEvent NuGet package and includes details about obtaining call stacks when waits occur.
End to End Testing using Playwright in Blazor WASM
6 minutes by Abdul Rahman, Shabeek Mohamed
Let's learn how to perform end to end testing for Blazor WebAssembly applications using Playwright, an open-source testing tool by Microsoft. This article covers essential aspects including test project setup, test recording, base URL configuration, debugging with screenshots, and trace analysis. It also provides practical examples of implementing test workflows, including login flows, and demonstrates how to use Playwright's features like the Trace Viewer for effective test troubleshooting and analysis.
More Testing Tips With C#
4 minutes by Roman Stoffel
This article discusses three useful testing tips in C#: using Faker.NET and Bogus.NET libraries for generating realistic test data, implementing reference data testing for stable rendering code, and finding free ports and IPs for integration testing. Roman demonstrates practical examples of each approach, with a particular focus on how Faker.NET and Bogus.NET can generate human-like test data in multiple languages and locales.
HTTP Logging: how to automatically log all incoming requests
8 minutes by Davide Bellone
Arenβt you tired of adding manual logs to your HTTP APIs to log HTTP requests and responses? In this article Davide explains how to implement HTTP Logging in ASP.NET applications using built-in middleware, which automatically logs details of incoming HTTP requests and responses without manual logging code.
Pattern Matching
3 minutes by Jesse Liberty
Jesse explains pattern matching in C# using Microsoft's canal lock example, demonstrating how to simplify complex state logic. He shows how a state machine controlling a water gate can be elegantly implemented using C#'s switch expressions and pattern matching, reducing multiple conditional statements into a concise, readable format.
how did you like this issue? |