Back in the years of Visual Basic, there was a powerful tool called VBWatch. Today's free equivalent for C# is a custom Fody attribute (using MethodDecorator.Fody or MethodBoundaryAspect.Fody).
Of course there are also paid tools like PostSharp.
A high-FAP post isn’t louder.
It’s clearer.
It doesn’t force.
It flows.
Not trying to impress.
Just trying to tell the truth — well.
@FractionAI_xyz#Faps#PostSharp
PostSharp and Fody are two nuget packages that enable this type of functionality for .NET projects.
If you're trying to do it for a WebApi, you can also use logging middleware to log data coming into your service endpoint and being returned.
Our thanks go out to the team at @postsharp for supporting the show by sponsoring this week's episode.
Reduce your boilerplate code by up to 15% with Metalama’s C#-to-C# template engine and reduce your code complexity today!
metalama.net/?utm_source=mdn…
Thank you to our newest sponsor, Metalama by @postsharp. We are excited to welcome them as a #TechBash 2024 Silver Sponsor.
See what Metalama can do for your #dotnet code at postsharp.net/metalama & register for TechBash with 10% off with code DOTNET10: techbash.com/
Eliminate Repetitive Coding in C# 12. Metalama 2024.0 by @postsharp now allows different C# code generation patterns based on C# versions 10, 11 and 12 / #dotNET8. dlvr.it/T1WG6d
Also @postsharp is building some cool stuff with Metalama, but "AOP" as a keyword isn't front-and-center in their messaging. It's not about the gory details of AOP, it's about what problems it solves.
O @rponte desenterrou (pelo menos pra mim) o termo AOP (aspect oriented programming / programação orientada a aspecto). Quem aí usava ou ainda usa essa abordagem?
Nos meus idos tempos de dev C# eu usava aquela lib PostSharp. O Java tem o famoso AspectJ.
Attributes are poorly implementated in dotnet without ancillary libs / frameworks.
If attributes, natively to the language, had an execution capability (a la PostSharp) they'd both be awesome and much more widely used.
It might be best to look at a specific implementation rather than a general thing because AOP typically lives/dies by its implementation.
PostSharp might be an excellent place to start.
postsharp.net/