This article will explore how to trace method calls in a .NET Aspire app without boilerplate code using Metalama. It uses a base example of a to-do list app with an ASP.NET Core Minimal API backend and a Blazor front-end, orchestrated using .NET Aspire. During the article, we’ll demonstrate how to log all public methods of the app using the [Log] aspect with a special kind of class called a fab...
Aspect-oriented programming (AOP) was invented in the early 2000s and enjoyed a few years of hype. Althought it has been implemented in many languages, it seems to have faded in the background. Even Metalama, the most comprehensive AOP framework for .NET, does not primarily market itself as an AOP framework. What ever happened to AOP, and what is its status in the .NET world today?
Factories are methods or objects whose only role is to create other objects. The Factory Method and Abstract Factory patterns are two creational design patterns originally identified in the seminal “Gang of Four” Design Patterns book. They are still crucial today in .NET. This article explains, with concrete examples, when to use this pattern in modern C# applications and how to make sure that ...
The focus this month for the whole community was on Microsoft’s release of .NET 9. Almost immediately, we published the RC builds of Metalama and PostSharp 2025.0 to support the new stacks. After running our reference performance test suite, we’re thrilled to announce significant performance improvements in Metalama 2025.0.
Starting from Metalama 2024.1, we’ve spent significant effort to optimize performance. After a thorough analysis of the benchmarks, we’re excited to report that Metalama’s performance has more than doubled, typically just adding 25-35% to the standard build time.