I’m wondering if it’s possible to wrap a method only by adding an attribute.
Example: I want to log the execution time a method takes.
[LogTimings]
public void work()
{
..
}
This is kind of wrapping a method into another one (see this python implementation).
AOP is possible in .NET. Here’s an article about it. And here’s a list of AOP frameworks for .NET.